Class: FiniteMachine::StateDefinition Private
- Inherits:
-
Object
- Object
- FiniteMachine::StateDefinition
- Defined in:
- lib/finite_machine/state_definition.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A class responsible for defining state query methods on state machine
Used by TranstionBuilder to add state query definition to the StateMachine instance.
Instance Method Summary collapse
-
#apply(states) ⇒ nil
Define query methods for states.
-
#initialize(machine) ⇒ StateDefinition
constructor
Initialize a StateDefinition.
Constructor Details
#initialize(machine) ⇒ StateDefinition
Initialize a StateDefinition
16 17 18 |
# File 'lib/finite_machine/state_definition.rb', line 16 def initialize(machine) @machine = machine end |
Instance Method Details
#apply(states) ⇒ nil
Define query methods for states
28 29 30 |
# File 'lib/finite_machine/state_definition.rb', line 28 def apply(states) define_state_query_methods(states) end |