Class: DRbQS::Task::TaskSet::ContainerTask
- Defined in:
- lib/drbqs/task/task.rb
Instance Method Summary collapse
- #exec ⇒ Object
- #exec_all_hooks(srv, result) ⇒ Object
-
#initialize(task_ary) ⇒ ContainerTask
constructor
A new instance of ContainerTask.
Methods inherited from Container
Constructor Details
#initialize(task_ary) ⇒ ContainerTask
Returns a new instance of ContainerTask.
120 121 122 |
# File 'lib/drbqs/task/task.rb', line 120 def initialize(task_ary) @data = task_ary end |
Instance Method Details
#exec ⇒ Object
124 125 126 127 128 |
# File 'lib/drbqs/task/task.rb', line 124 def exec @data.map do |task| DRbQS::Task.call_task_method(task.obj, task.method_name, task.args) end end |
#exec_all_hooks(srv, result) ⇒ Object
130 131 132 133 134 |
# File 'lib/drbqs/task/task.rb', line 130 def exec_all_hooks(srv, result) result.each_with_index do |res, i| @data[i].exec_hook(srv, res) end end |