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.



73
74
75
76
77
# File 'lib/statecraft/errors.rb', line 73

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

#record ⇒ Object (readonly)

Returns the value of attribute record.



71
72
73
# File 'lib/statecraft/errors.rb', line 71

def record
  @record
end