Class: NxtStateMachine::EventRegistry
- Inherits:
-
NxtRegistry::Registry
- Object
- NxtRegistry::Registry
- NxtStateMachine::EventRegistry
- Defined in:
- lib/nxt_state_machine/event_registry.rb
Instance Method Summary collapse
-
#initialize ⇒ EventRegistry
constructor
A new instance of EventRegistry.
Constructor Details
#initialize ⇒ EventRegistry
Returns a new instance of EventRegistry.
3 4 5 6 7 8 9 |
# File 'lib/nxt_state_machine/event_registry.rb', line 3 def initialize super :events do on_key_already_registered do |key| raise NxtStateMachine::Errors::EventAlreadyRegistered, "An event with the name '#{key}' was already registered!" end end end |