Class: NxtStateMachine::StateRegistry

Inherits:
NxtRegistry::Registry
  • Object
show all
Defined in:
lib/nxt_state_machine/state_registry.rb

Instance Method Summary collapse

Constructor Details

#initializeStateRegistry

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