Module: Roby::Transaction::PlanServiceProxy
- Defined in:
- lib/roby/transaction/plan_service_proxy.rb
Instance Method Summary collapse
- #commit_transaction ⇒ Object
- #on_plan_status_change(&handler) ⇒ Object
- #setup_proxy(object, plan) ⇒ Object
- #task=(new_task) ⇒ Object
Instance Method Details
#commit_transaction ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/roby/transaction/plan_service_proxy.rb', line 24 def commit_transaction replacement_handlers.each do |h| __getobj__.on_replacement(&h) end plan_status_handlers.each do |h| __getobj__.on_plan_status_change(&h) end event_handlers.each do |event, handlers| handlers.each do |h| __getobj__.on(event, &h) end end finalization_handlers.each do |h| __getobj__.when_finalized(&h) end end |
#on_plan_status_change(&handler) ⇒ Object
20 21 22 |
# File 'lib/roby/transaction/plan_service_proxy.rb', line 20 def on_plan_status_change(&handler) plan_status_handlers << handler end |
#setup_proxy(object, plan) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/roby/transaction/plan_service_proxy.rb', line 12 def setup_proxy(object, plan) super finalization_handlers.clear event_handlers.clear plan_status_handlers.clear replacement_handlers.clear end |
#task=(new_task) ⇒ Object
8 9 10 |
# File 'lib/roby/transaction/plan_service_proxy.rb', line 8 def task=(new_task) @task = new_task end |