Class: StateMachine::Existing

Inherits:
Object
  • Object
show all
Defined in:
app/state_machine/existing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_indexObject (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

Raises:



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_stateObject



15
16
# File 'app/state_machine/existing.rb', line 15

def next_state
end

#to_sObject



11
12
13
# File 'app/state_machine/existing.rb', line 11

def to_s
  ""
end