Class: Boilercode::CLI

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

#loginObject



51
52
53
54
55
56
57
58
# File 'lib/boilercode/cli.rb', line 51

def (*)
  if options[:help]
    invoke :help, ["login"]
  else
    require_relative "commands/login"
    Boilercode::Commands::Login.new.execute
  end
end

#newsObject



39
40
41
42
43
44
45
46
# File 'lib/boilercode/cli.rb', line 39

def news(*)
  if options[:help]
    invoke :help, ["news"]
  else
    require_relative "commands/news"
    Boilercode::Commands::News.new(options).execute
  end
end

#versionObject



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

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