Exception: AASM::InvalidTransition
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- AASM::InvalidTransition
- Defined in:
- lib/aasm/errors.rb
Instance Attribute Summary collapse
-
#event_name ⇒ Object
readonly
Returns the value of attribute event_name.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#state_machine_name ⇒ Object
readonly
Returns the value of attribute state_machine_name.
Instance Method Summary collapse
-
#initialize(object, event_name, state_machine_name) ⇒ InvalidTransition
constructor
A new instance of InvalidTransition.
- #message ⇒ Object
Constructor Details
#initialize(object, event_name, state_machine_name) ⇒ InvalidTransition
Returns a new instance of InvalidTransition.
8 9 10 |
# File 'lib/aasm/errors.rb', line 8 def initialize(object, event_name, state_machine_name) @object, @event_name, @state_machine_name = object, event_name, state_machine_name end |
Instance Attribute Details
#event_name ⇒ Object (readonly)
Returns the value of attribute event_name.
6 7 8 |
# File 'lib/aasm/errors.rb', line 6 def event_name @event_name end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
6 7 8 |
# File 'lib/aasm/errors.rb', line 6 def object @object end |
#state_machine_name ⇒ Object (readonly)
Returns the value of attribute state_machine_name.
6 7 8 |
# File 'lib/aasm/errors.rb', line 6 def state_machine_name @state_machine_name end |
Instance Method Details
#message ⇒ Object
12 13 14 |
# File 'lib/aasm/errors.rb', line 12 def "Event '#{event_name}' cannot transition from '#{object.aasm(state_machine_name).current_state}'" end |