Class: SSHMan::TUI

Inherits:
Object
  • Object
show all
Defined in:
lib/sshman/tui.rb

Instance Method Summary collapse

Constructor Details

#initializeTUI

Returns a new instance of TUI.



8
9
10
# File 'lib/sshman/tui.rb', line 8

def initialize
  @prompt = TTY::Prompt.new
end

Instance Method Details

#startObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/sshman/tui.rb', line 12

def start
  loop do
    case main_menu
    when 'List Connections'
      list_connections
    when 'Add Connection'
      add_connection
    when 'Edit Connection'
      edit_connection
    when 'Delete Connection'
      delete_connection
    when 'Connect'
      connect
    when 'Exit'
      break
    end
  end
end