Class: Sumcli::CLI
- Inherits:
-
Thor
- Object
- Thor
- Sumcli::CLI
- Defined in:
- lib/sumcli/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
#new(name) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/sumcli/cli.rb', line 40 def new(name) if [:help] invoke :help, ['new'] else Sumcli::Commands::New.new(name, ).execute end end |
#start ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/sumcli/cli.rb', line 24 def start(*) if [:help] invoke :help, ['start'] else require_relative 'commands/start' Sumcli::Commands::Start.new().execute end end |
#version ⇒ Object
15 16 17 18 |
# File 'lib/sumcli/cli.rb', line 15 def version require_relative 'version' puts "v#{Sumcli::VERSION}" end |