Exception: Legion::Gaia::Workflow::GuardRejected
- Defined in:
- lib/legion/gaia/workflow/errors.rb
Overview
Raised when a transition guard returns false
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#guard_name ⇒ Object
readonly
Returns the value of attribute guard_name.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(from, to, guard_name = nil) ⇒ GuardRejected
constructor
A new instance of GuardRejected.
Constructor Details
#initialize(from, to, guard_name = nil) ⇒ GuardRejected
Returns a new instance of GuardRejected.
24 25 26 27 28 29 30 |
# File 'lib/legion/gaia/workflow/errors.rb', line 24 def initialize(from, to, guard_name = nil) @from = from @to = to @guard_name = guard_name label = guard_name ? " (guard: #{guard_name})" : '' super("Transition from #{from.inspect} to #{to.inspect} rejected by guard#{label}") end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
22 23 24 |
# File 'lib/legion/gaia/workflow/errors.rb', line 22 def from @from end |
#guard_name ⇒ Object (readonly)
Returns the value of attribute guard_name.
22 23 24 |
# File 'lib/legion/gaia/workflow/errors.rb', line 22 def guard_name @guard_name end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
22 23 24 |
# File 'lib/legion/gaia/workflow/errors.rb', line 22 def to @to end |