Class: KStarter::CLI

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

#configuration(subcommand = :menu) ⇒ Object



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

def configuration(subcommand = :menu)
  if options[:help]
    invoke :help, ['configuration']
  else
    KStarter::Commands::ConfigurationMenu.new(subcommand, options).execute
  end
end

#project(subcommand = :menu) ⇒ Object



55
56
57
58
59
60
61
# File 'lib/k_starter/cli.rb', line 55

def project(subcommand = :menu)
  if options[:help]
    invoke :help, ['project']
  else
    KStarter::Commands::ProjectMenu.new(subcommand, options).execute
  end
end

#versionObject



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

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