Class: Stealth::Cli

Inherits:
Thor
  • Object
show all
Extended by:
CliBase
Defined in:
lib/stealth/cli.rb

Instance Method Summary collapse

Methods included from CliBase

banner, define_commands, handle_argument_error

Instance Method Details

#consoleObject



61
62
63
64
65
66
67
# File 'lib/stealth/cli.rb', line 61

def console
  if options[:help]
    invoke :help, ['console']
  else
    Stealth::Commands::Console.new(options).start
  end
end

#serverObject



42
43
44
45
46
47
48
49
# File 'lib/stealth/cli.rb', line 42

def server
  if options[:help]
    invoke :help, ['server']
  else
    require 'stealth/commands/server'
    Stealth::Commands::Server.new(options).start
  end
end

#setup(service) ⇒ Object



76
77
78
79
80
# File 'lib/stealth/cli.rb', line 76

def setup(service)
  Stealth.load_environment
  service_setup_klass = "Stealth::Services::#{service.classify}::Setup".constantize
  service_setup_klass.trigger
end

#versionObject



16
17
18
19
# File 'lib/stealth/cli.rb', line 16

def version
  require 'stealth/version'
  puts "#{ Stealth::VERSION }"
end