Class: Bartab::CLI
- Inherits:
-
Thor
- Object
- Thor
- Bartab::CLI
- Defined in:
- lib/bartab/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
#install ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/bartab/cli.rb', line 24 def install(*) if [:help] invoke :help, ['install'] else require_relative 'commands/install' Bartab::Commands::Install.new().execute end end |
#setup ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/bartab/cli.rb', line 36 def setup(*) if [:help] invoke :help, ['setup'] else require_relative 'commands/setup' Bartab::Commands::Setup.new().execute end end |
#version ⇒ Object
15 16 17 18 |
# File 'lib/bartab/cli.rb', line 15 def version require_relative 'version' puts "v#{Bartab::VERSION}" end |