浏览代码

update: mac Job

Mark24 2 年之前
父节点
当前提交
349a593d5f
共有 1 个文件被更改,包括 3 次插入4 次删除
  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