Class: Bcli::CLI
- Inherits:
-
Thor
- Object
- Thor
- Bcli::CLI
- Defined in:
- lib/bcli/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
45 46 47 48 49 50 51 52 |
# File 'lib/bcli/cli.rb', line 45 def login(*) if [:help] invoke :help, ["login"] else require_relative "commands/login" Bcli::Commands::Login.new.execute end end |
#news ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/bcli/cli.rb', line 33 def news(*) if [:help] invoke :help, ["news"] else require_relative "commands/news" Bcli::Commands::News.new().execute end end |
#version ⇒ Object
15 16 17 18 |
# File 'lib/bcli/cli.rb', line 15 def version require_relative "version" puts "v#{Bcli::VERSION}" end |