Class: AlterEgo::StateHook
- Inherits:
-
HookR::Hook
- Object
- HookR::Hook
- AlterEgo::StateHook
- Defined in:
- lib/alter_ego.rb
Overview
A customization of HookR::Hook to deal with the fact that State internal callbacks need to be executed in the context of the state’s context, not the state object itself.
Defined Under Namespace
Classes: StateContextCallback
Instance Method Summary collapse
-
#add_internal_callback(handle = nil, &block) ⇒ Object
Add an internal callback that executes in the context of the state context, instead of the state itself.
Instance Method Details
#add_internal_callback(handle = nil, &block) ⇒ Object
Add an internal callback that executes in the context of the state context, instead of the state itself
88 89 90 |
# File 'lib/alter_ego.rb', line 88 def add_internal_callback(handle=nil, &block) add_block_callback(StateContextCallback, handle, &block) end |