Class: DRbQS::TaskSet
Instance Attribute Summary
Attributes inherited from Task
Instance Method Summary collapse
-
#initialize(task_ary) ⇒ TaskSet
constructor
A new instance of TaskSet.
Methods inherited from Task
#drb_args, execute_task, #same_target?
Constructor Details
#initialize(task_ary) ⇒ TaskSet
Returns a new instance of TaskSet.
108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/drbqs/task.rb', line 108 def initialize(task_ary) @original_hook = task_ary.map do |task| task.hook end super(DRbQS::TaskContainer.new(task_ary), :exec) do |srv, result| result.each_with_index do |res, i| if hook = @original_hook[i] hook.call(srv, res) end end end end |