Class: Uberssh::App

Inherits:
Object
  • Object
show all
Defined in:
lib/uberssh/app.rb

Instance Method Summary collapse

Constructor Details

#initialize(account_name: nil) ⇒ App

Returns a new instance of App.



5
6
7
8
# File 'lib/uberssh/app.rb', line 5

def initialize(account_name: nil)
  @account_name = 
  @manager      = AccountManager.new
end

Instance Method Details

#startObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/uberssh/app.rb', line 10

def start
  begin
     = nil

    unless @account_name
       = 
    else
       = @manager.(@account_name)
      raise "The given Uberspace account was not found." unless 
    end

    system "clear"

    puts "Connecting to #{.project}..."
    connect_via_ssh_to()
  rescue Exception => e
    puts e.message
  end
end