Class: RMachine::Event
- Inherits:
-
Object
- Object
- RMachine::Event
- Defined in:
- lib/r_machine/event.rb
Instance Attribute Summary collapse
-
#event_name ⇒ Object
readonly
Returns the value of attribute event_name.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
Instance Method Summary collapse
- #change_to(state, rule_options = {}) ⇒ Object
-
#initialize(event_name) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(event_name) ⇒ Event
Returns a new instance of Event.
5 6 7 8 |
# File 'lib/r_machine/event.rb', line 5 def initialize(event_name) @event_name = event_name @rules = [] end |
Instance Attribute Details
#event_name ⇒ Object (readonly)
Returns the value of attribute event_name.
3 4 5 |
# File 'lib/r_machine/event.rb', line 3 def event_name @event_name end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
3 4 5 |
# File 'lib/r_machine/event.rb', line 3 def rules @rules end |