Class: MediaMonster::Task

Inherits:
Model
  • Object
show all
Defined in:
lib/media_monster/task.rb

Instance Attribute Summary collapse

Attributes inherited from Model

#id, #status

Instance Method Summary collapse

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.options     = 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_backObject

string



8
9
10
# File 'lib/media_monster/task.rb', line 8

def call_back
  @call_back
end

#labelObject

string



9
10
11
# File 'lib/media_monster/task.rb', line 9

def label
  @label
end

#optionsObject

hash



6
7
8
# File 'lib/media_monster/task.rb', line 6

def options
  @options
end

#resultObject

string



7
8
9
# File 'lib/media_monster/task.rb', line 7

def result
  @result
end

#task_typeObject

string



5
6
7
# File 'lib/media_monster/task.rb', line 5

def task_type
  @task_type
end