Class: Wakame::Action::ProcAction

Inherits:
Wakame::Action show all
Defined in:
lib/wakame/action.rb

Constant Summary

Constants included from AttributeHelper

AttributeHelper::CLASS_TYPE_KEY, AttributeHelper::CONVERT_CLASSES, AttributeHelper::PRIMITIVE_CLASSES

Instance Attribute Summary

Attributes inherited from Wakame::Action

#action_manager

Instance Method Summary collapse

Methods inherited from Wakame::Action

#acquire_lock, #actor_request, #agent_monitor, #all_subactions_complete?, #flush_subactions, #master, #notes, #notify, #on_canceled, #on_failed, #service_cluster, #status=, #subactions, #sync_actor_request, #trigger_action, #walk_subactions

Methods included from ThreadImmutable

#bind_thread, included, #target_thread, #target_thread?, #thread_check

Methods included from AttributeHelper

#dump_attrs, #retrieve_attr_attribute

Constructor Details

#initialize(proc_obj) ⇒ ProcAction

Returns a new instance of ProcAction.

Raises:

  • (ArgumentError)


151
152
153
154
# File 'lib/wakame/action.rb', line 151

def initialize(proc_obj)
  raise ArgumentError unless proc_obj.is_a? Proc
  @proc_obj = proc_obj
end

Instance Method Details

#runObject



156
157
158
# File 'lib/wakame/action.rb', line 156

def run()
  @proc_obj.call(self)
end