Class: Guac::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/guac/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

#setupObject



21
22
23
24
25
26
27
28
# File 'lib/guac/cli.rb', line 21

def setup(*)
  if options[:help]
    invoke :help, ['setup']
  else
    require_relative 'commands/setup'
    Guac::Commands::Setup.new(options, self).execute
  end
end

#statusObject



32
33
34
35
36
37
38
39
# File 'lib/guac/cli.rb', line 32

def status(*)
  if options[:help]
    invoke :help, ['status']
  else
    require_relative 'commands/status'
    Guac::Commands::Status.new(options).execute
  end
end

#upObject



45
46
47
48
49
50
51
52
# File 'lib/guac/cli.rb', line 45

def up(*)
  if options[:help]
    invoke :help, ['up']
  else
    require_relative 'commands/up'
    Guac::Commands::Up.new(options, ARGV).execute
  end
end

#versionObject



13
14
15
16
# File 'lib/guac/cli.rb', line 13

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