Class: Churned::CLI

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

#consoleObject



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

def console(*)
  if options[:help]
    invoke :help, ['console']
  else
    require_relative 'commands/console'
    Churned::Commands::Console.new(options).execute
  end
end

#installObject



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

def install(*)
  if options[:help]
    invoke :help, ['install']
  else
    require_relative 'commands/install'
    Churned::Commands::Install.new(options).execute
  end
end

#versionObject



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

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