Class: MediaMonster::Sequence
- Defined in:
- lib/media_monster/sequence.rb
Instance Attribute Summary collapse
-
#call_back ⇒ Object
attr_accessor :options #hash attr_accessor :result #string.
-
#label ⇒ Object
string.
-
#tasks ⇒ Object
array.
Attributes inherited from Model
Instance Method Summary collapse
- #add_task(*args) ⇒ Object
-
#initialize(*args) ⇒ Sequence
constructor
A new instance of Sequence.
Methods inherited from Model
#as_json_with_class_name, #to_json
Constructor Details
#initialize(*args) ⇒ Sequence
Returns a new instance of Sequence.
11 12 13 14 |
# File 'lib/media_monster/sequence.rb', line 11 def initialize(*args) super self.tasks = [] end |
Instance Attribute Details
#call_back ⇒ Object
attr_accessor :options #hash attr_accessor :result #string
7 8 9 |
# File 'lib/media_monster/sequence.rb', line 7 def call_back @call_back end |
#label ⇒ Object
string
8 9 10 |
# File 'lib/media_monster/sequence.rb', line 8 def label @label end |
#tasks ⇒ Object
array
9 10 11 |
# File 'lib/media_monster/sequence.rb', line 9 def tasks @tasks end |
Instance Method Details
#add_task(*args) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/media_monster/sequence.rb', line 16 def add_task(*args) new_task = if (args.length == 1 && args[0].is_a?(MediaMonster::Task)) args[0] else MediaMonster::Task.new(*args) end self.tasks << new_task end |