Exception: Transitionable::InvalidStateTransition
- Inherits:
-
StandardError
- Object
- StandardError
- Transitionable::InvalidStateTransition
- Defined in:
- lib/transitionable.rb
Instance Method Summary collapse
-
#initialize(from_state, to_state) ⇒ InvalidStateTransition
constructor
A new instance of InvalidStateTransition.
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 |