Class: DRbQS::Task::TaskSet::ContainerTask

Inherits:
Container
  • Object
show all
Defined in:
lib/drbqs/task/task.rb

Instance Method Summary collapse

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

#execObject



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