Class: MediaMonster::Task
Instance Attribute Summary collapse
-
#call_back ⇒ Object
string.
-
#label ⇒ Object
string.
-
#options ⇒ Object
hash.
-
#result ⇒ Object
string.
-
#task_type ⇒ Object
string.
Attributes inherited from Model
Instance Method Summary collapse
-
#initialize(*args) ⇒ Task
constructor
A new instance of Task.
Methods inherited from Model
#as_json_with_class_name, #to_json
Constructor Details
#initialize(*args) ⇒ Task
Returns a new instance of Task.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/media_monster/task.rb', line 11 def initialize(*args) super if args[0].is_a?(String) || args[0].is_a?(Symbol) self.task_type = args[0].to_s self. = args[1] self.result = args[2].to_s self.call_back = args[3].to_s self.label = args[4].to_s end end |
Instance Attribute Details
#call_back ⇒ Object
string
8 9 10 |
# File 'lib/media_monster/task.rb', line 8 def call_back @call_back end |
#label ⇒ Object
string
9 10 11 |
# File 'lib/media_monster/task.rb', line 9 def label @label end |
#options ⇒ Object
hash
6 7 8 |
# File 'lib/media_monster/task.rb', line 6 def @options end |
#result ⇒ Object
string
7 8 9 |
# File 'lib/media_monster/task.rb', line 7 def result @result end |
#task_type ⇒ Object
string
5 6 7 |
# File 'lib/media_monster/task.rb', line 5 def task_type @task_type end |