Class: Boilercode::CLI
- Inherits:
-
Thor
- Object
- Thor
- Boilercode::CLI
- 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
#login ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'lib/boilercode/cli.rb', line 51 def login(*) if [:help] invoke :help, ["login"] else require_relative "commands/login" Boilercode::Commands::Login.new.execute end end |
#news ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/boilercode/cli.rb', line 39 def news(*) if [:help] invoke :help, ["news"] else require_relative "commands/news" Boilercode::Commands::News.new().execute end end |
#version ⇒ Object
15 16 17 18 |
# File 'lib/boilercode/cli.rb', line 15 def version require_relative "version" puts "v#{Boilercode::VERSION}" end |