Class: DRbQS::TaskContainer
- Inherits:
-
Object
- Object
- DRbQS::TaskContainer
- Defined in:
- lib/drbqs/task.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
- #exec ⇒ Object
-
#initialize(task_ary) ⇒ TaskContainer
constructor
A new instance of TaskContainer.
Constructor Details
#initialize(task_ary) ⇒ TaskContainer
Returns a new instance of TaskContainer.
83 84 85 86 87 |
# File 'lib/drbqs/task.rb', line 83 def initialize(task_ary) @data = task_ary.map.with_index do |task, i| task.drb_args(i) end end |
Instance Method Details
#==(other) ⇒ Object
100 101 102 103 104 |
# File 'lib/drbqs/task.rb', line 100 def ==(other) other.data.each_with_index.all? do |ary, i| ary == @data[i] end end |
#exec ⇒ Object
89 90 91 92 93 |
# File 'lib/drbqs/task.rb', line 89 def exec @data.map do |ary| DRbQS::Task.execute_task(*ary[1..-1]) end end |