Exception: Transitionable::InvalidStateTransition

Inherits:
StandardError
  • Object
show all
Defined in:
lib/transitionable.rb

Instance Method Summary collapse

Constructor Details

#initialize(from_state, to_state) ⇒ InvalidStateTransition

Returns a new instance of InvalidStateTransition.



10
11
12
13
14
15
# File 'lib/transitionable.rb', line 10

def initialize(from_state, to_state)
  msg = from_state ?
    "Can't transition from #{from_state} to #{to_state}." :
    "Can't transition to #{to_state}."
  super(msg)
end