Class: Rubyists::Opr::CLI
- Inherits:
-
Thor
- Object
- Thor
- Rubyists::Opr::CLI
- Defined in:
- lib/rubyists::opr/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)
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
16 17 18 |
# File 'lib/rubyists::opr/cli.rb', line 16 def self.exit_on_failure? true end |
Instance Method Details
#gen(path = nil) ⇒ Object
72 73 74 75 76 77 78 79 |
# File 'lib/rubyists::opr/cli.rb', line 72 def gen(path = nil) if [:help] invoke :help, ['gen'] else require_relative 'commands/gen' Rubyists::Opr::Commands::Gen.new(path, ).execute end end |
#get(item) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/rubyists::opr/cli.rb', line 45 def get(item) if [:help] invoke :help, ['get'] else require_relative 'commands/get' Rubyists::Opr::Commands::Get.new(item, ).execute end end |