Class: StateMachine::Quit
- Inherits:
-
Object
- Object
- StateMachine::Quit
- Defined in:
- app/state_machine/quit.rb
Instance Attribute Summary collapse
-
#selected_index ⇒ Object
readonly
Returns the value of attribute selected_index.
Instance Method Summary collapse
- #action(window) ⇒ Object
-
#initialize(selected_index) ⇒ Quit
constructor
A new instance of Quit.
- #next_state ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(selected_index) ⇒ Quit
Returns a new instance of Quit.
5 6 7 |
# File 'app/state_machine/quit.rb', line 5 def initialize(selected_index) @selected_index = selected_index end |
Instance Attribute Details
#selected_index ⇒ Object (readonly)
Returns the value of attribute selected_index.
3 4 5 |
# File 'app/state_machine/quit.rb', line 3 def selected_index @selected_index end |
Instance Method Details
#action(window) ⇒ Object
9 10 11 |
# File 'app/state_machine/quit.rb', line 9 def action(window) raise ExitAction.new end |
#next_state ⇒ Object
13 14 |
# File 'app/state_machine/quit.rb', line 13 def next_state end |
#to_s ⇒ Object
16 17 18 |
# File 'app/state_machine/quit.rb', line 16 def to_s "Exit" end |