Class: FiniteMachine::TransitionEvent Private
- Inherits:
-
Object
- Object
- FiniteMachine::TransitionEvent
- Defined in:
- lib/finite_machine/transition_event.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 representing a callback transition event
Used internally by Observer
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
This event from state name.
-
#name ⇒ Object
readonly
This event name.
-
#to ⇒ Object
readonly
This event to state name.
Instance Method Summary collapse
-
#initialize(event_name, from, to) ⇒ self
constructor
private
Build a transition event.
Constructor Details
#initialize(event_name, from, to) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Build a transition event
40 41 42 43 44 45 |
# File 'lib/finite_machine/transition_event.rb', line 40 def initialize(event_name, from, to) @name = event_name @from = from @to = to freeze end |
Instance Attribute Details
#from ⇒ Object (readonly)
This event from state name
17 18 19 |
# File 'lib/finite_machine/transition_event.rb', line 17 def from @from end |
#name ⇒ Object (readonly)
This event name
29 30 31 |
# File 'lib/finite_machine/transition_event.rb', line 29 def name @name end |
#to ⇒ Object (readonly)
This event to state name
24 25 26 |
# File 'lib/finite_machine/transition_event.rb', line 24 def to @to end |