Class: NxtStateMachine::EventRegistry

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

Instance Method Summary collapse

Constructor Details

#initializeEventRegistry

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