class Rubyists::Opr::CLI
Handle the application command line parsing and the dispatch to various command objects
@api public
Constants
- Error
Error
raised by this runner
Public Class Methods
exit_on_failure?()
click to toggle source
# File lib/rubyists::opr/cli.rb, line 16 def self.exit_on_failure? true end
Public Instance Methods
gen(path = nil)
click to toggle source
# File lib/rubyists::opr/cli.rb, line 72 def gen(path = nil) if options[:help] invoke :help, ['gen'] else require_relative 'commands/gen' Rubyists::Opr::Commands::Gen.new(path, options).execute end end
get(item)
click to toggle source
# File lib/rubyists::opr/cli.rb, line 45 def get(item) if options[:help] invoke :help, ['get'] else require_relative 'commands/get' Rubyists::Opr::Commands::Get.new(item, options).execute end end
rm(item)
click to toggle source
# File lib/rubyists::opr/cli.rb, line 32 def rm(item) if options[:help] invoke :help, ['rm'] else require_relative 'commands/rm' Rubyists::Opr::Commands::Rm.new(item, options).execute end end
version()
click to toggle source
# File lib/rubyists::opr/cli.rb, line 21 def version require_relative 'version' puts "v#{Rubyists::Opr::VERSION}" end