Class | StateMachine::Path |
In: |
lib/state_machine/path.rb
|
Parent: | Array |
machine | [R] | The state machine this path is walking |
object | [R] | The object whose state machine is being walked |
Creates a new transition path for the given object. Initially this is an empty path. In order to start walking the path, it must be populated with an initial transition.
Configuration options:
Determines whether or not this path has completed. A path is considered complete when one of the following conditions is met:
Lists all of the events that can be fired through this path.
For example,
path.events # => [:park, :ignite, :shift_up, ...]
Lists all of the from states that can be reached through this path.
For example,
path.to_states # => [:parked, :idling, :first_gear, ...]
The end state name for this path. If a target state was specified for the path, then that will be returned if the path is complete.
Lists all of the to states that can be reached through this path.
For example,
path.to_states # => [:parked, :idling, :first_gear, ...]
Walks down the next transitions at the end of this path. This will only walk down paths that are considered valid.