Class: Sshify::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/sshify/cli.rb

Overview

Handle the application command line parsing and the dispatch to various command objects

Constant Summary collapse

Error =

Error raised by this runner

Class.new(StandardError)

Instance Method Summary collapse

Instance Method Details

#configObject



37
38
39
40
41
42
43
44
# File 'lib/sshify/cli.rb', line 37

def config(*)
  if options[:help]
    invoke :help, ['config']
  else
    require_relative 'commands/config'
    Sshify::Commands::Config.new(options).execute
  end
end

#connectObject



24
25
26
27
28
29
30
31
# File 'lib/sshify/cli.rb', line 24

def connect(*)
  if options[:help]
    invoke :help, ['connect']
  else
    require_relative 'commands/connect'
    Sshify::Commands::Connect.new(options).execute
  end
end

#versionObject



15
16
17
18
# File 'lib/sshify/cli.rb', line 15

def version
  require_relative 'version'
  puts "v#{Sshify::VERSION}"
end