Exception: Statecraft::NestedTransitionError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record:) ⇒ NestedTransitionError

Returns a new instance of NestedTransitionError.



95
96
97
98
99
# File 'lib/statecraft/errors.rb', line 95

def initialize(record:)
  @record = record
  super("transition initiated from before_transition or a guard of another transition " \
        "on #{record.class.name}##{record.id}; move it to after_transition or outside")
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



93
94
95
# File 'lib/statecraft/errors.rb', line 93

def record
  @record
end