module Envo::Cli::Runner::Opts
Constants
- Defaults
Public Instance Methods
parse_cli(opt)
click to toggle source
# File lib/envo/cli/runner.rb, line 17 def parse_cli(opt) case opt when '--force', '-f' then return {interact: :force} when '--no-force', '-nf' then return {interact: :noforce} when '--interactive' then return {interact: :interact} when '--raw', '-r' then return {raw: true} else raise Envo::Error.new "unknown command line option: #{opt}" end end
print_arg(log, arg, text)
click to toggle source
# File lib/envo/cli/runner.rb, line 26 def print_arg(log, arg, text) log.puts " #{arg.ljust(15)} - #{text}" end
print_help(log)
click to toggle source
# File lib/envo/cli/runner.rb, line 29 def print_help(log) print_arg log, '--force, -f', 'force the execution of the command disregarding checks' print_arg log, '--interactive', '(default) ask a question when a check fails' print_arg log, '--no-force, -nf', 'produce an error instead of asking questions for checks' print_arg log, '--raw, -r', 'don\'t infer types and treat each value as a raw string' end