Explorar o código

update: mac Job

Mark24 %!s(int64=2) %!d(string=hai) anos
pai
achega
349a593d5f
Modificáronse 1 ficheiros con 3 adicións e 4 borrados
  1. 3 4
      mac.rb

+ 3 - 4
mac.rb

@@ -25,13 +25,12 @@ class String
 end
 
 class Job
-  attr_accessor :status
+  attr_accessor :status, :intro
   def initialize
     @status = :waiting # :processing, :done, :fail
+    @intro = self.class.to_s.sub(/Job$/, "")
   end
-  def intro
-    self.class.to_s
-  end
+
   def call
   end