Class: StateMachine::Existing
- Inherits:
-
Object
- Object
- StateMachine::Existing
- Defined in:
- app/state_machine/existing.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, session_id) ⇒ Existing
constructor
A new instance of Existing.
- #next_state ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(selected_index, session_id) ⇒ Existing
Returns a new instance of Existing.
5 6 7 8 9 |
# File 'app/state_machine/existing.rb', line 5 def initialize(selected_index, session_id) @commander = Tmux::Commands.new @selected_index = selected_index @session_id = session_id end |
Instance Attribute Details
#selected_index ⇒ Object (readonly)
Returns the value of attribute selected_index.
3 4 5 |
# File 'app/state_machine/existing.rb', line 3 def selected_index @selected_index end |
Instance Method Details
#action(window) ⇒ Object
18 19 20 21 |
# File 'app/state_machine/existing.rb', line 18 def action(window) @commander.attach_to(@session_id) raise ExitAction.new end |
#next_state ⇒ Object
15 16 |
# File 'app/state_machine/existing.rb', line 15 def next_state end |
#to_s ⇒ Object
11 12 13 |
# File 'app/state_machine/existing.rb', line 11 def to_s "" end |