Exception: Fosm::InvalidTransition

Inherits:
Error
  • Object
show all
Defined in:
lib/fosm/errors.rb

Overview

Raised when fire! is called but current state doesn’t allow the event

Instance Method Summary collapse

Constructor Details

#initialize(event_name, current_state, record_class) ⇒ InvalidTransition

Returns a new instance of InvalidTransition.



13
14
15
# File 'lib/fosm/errors.rb', line 13

def initialize(event_name, current_state, record_class)
  super("Cannot fire '#{event_name}' from state '#{current_state}' on #{record_class.name}")
end