Module: Uberssh
- Defined in:
- lib/uberssh.rb,
lib/uberssh/app.rb,
lib/uberssh/account.rb,
lib/uberssh/version.rb,
lib/uberssh/account_manager.rb
Defined Under Namespace
Classes: Account, AccountManager, App
Constant Summary collapse
- VERSION =
"0.2.0"
Class Method Summary collapse
Class Method Details
.run ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/uberssh.rb', line 12 def self.run account_name = nil OptionParser.new do |opts| opts. = "Uberssh" opts.define_head "SSH to your Uberspace" opts.separator "" opts.separator "Options:" opts.on_tail("--help", "Show this message") do puts opts exit end opts.on_tail("-a", "--account ACCOUNTNAME", "Specify your Uberspace account.") do |name| account_name = name end begin opts.parse! rescue OptionParser::ParseError puts opts exit 1 end end App.new(account_name: account_name).start end |