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