Exception: StateFu::TransitionNotFound
- Defined in:
- lib/support/exceptions.rb
Constant Summary collapse
- DEFAULT_MESSAGE =
"Transition could not be determined"
Instance Attribute Summary collapse
-
#valid_destinations ⇒ Object
readonly
Returns the value of attribute valid_destinations.
-
#valid_transitions ⇒ Object
readonly
Returns the value of attribute valid_transitions.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(binding, valid_transitions, message = DEFAULT_MESSAGE, options = {}) ⇒ TransitionNotFound
constructor
A new instance of TransitionNotFound.
- #inspect ⇒ Object
Constructor Details
#initialize(binding, valid_transitions, message = DEFAULT_MESSAGE, options = {}) ⇒ TransitionNotFound
Returns a new instance of TransitionNotFound.
22 23 24 25 26 |
# File 'lib/support/exceptions.rb', line 22 def initialize(binding, valid_transitions, =DEFAULT_MESSAGE, ={}) @valid_transitions = valid_transitions @valid_destinations = valid_transitions.map(&:destination) super(binding, , ) end |
Instance Attribute Details
#valid_destinations ⇒ Object (readonly)
Returns the value of attribute valid_destinations.
19 20 21 |
# File 'lib/support/exceptions.rb', line 19 def valid_destinations @valid_destinations end |
#valid_transitions ⇒ Object (readonly)
Returns the value of attribute valid_transitions.
18 19 20 |
# File 'lib/support/exceptions.rb', line 18 def valid_transitions @valid_transitions end |
Instance Method Details
#inspect ⇒ Object
28 29 30 |
# File 'lib/support/exceptions.rb', line 28 def inspect "<#{self.class.to_s} #{} available=[#{valid_destinations.inspect}]>" end |