Class: Isono::EventDelegateContext
- Inherits:
-
Object
- Object
- Isono::EventDelegateContext
- Includes:
- EventObservable, Logger
- Defined in:
- lib/isono/event_delegate_context.rb
Overview
Catch all the event from the Statemachine and delegate.
Instance Method Summary collapse
-
#initialize(stm) ⇒ EventDelegateContext
constructor
A new instance of EventDelegateContext.
Methods included from Logger
Methods included from EventObservable
#add_observer, #add_observer_once, #fire_event, #remove_observer
Constructor Details
#initialize(stm) ⇒ EventDelegateContext
Returns a new instance of EventDelegateContext.
11 12 13 14 15 16 17 |
# File 'lib/isono/event_delegate_context.rb', line 11 def initialize(stm) raise ArgumentError unless stm.is_a? Statemachine::Statemachine initialize_event_observable @stm = stm @stm.context = self inject_event_handlers end |