module Mixlib::CLI::ClassMethods
Public Instance Methods
option(name, args)
click to toggle source
Add a command line option.
Parameters¶ ↑
- name<Symbol>
-
The name of the option to add
- args<Hash>
-
A hash of arguments for the option, specifying how it should be parsed.
Returns¶ ↑
- true
-
Always returns true.
# File lib/mixlib/cli.rb, line 98 def option(name, args) @options ||= {} raise(ArgumentError, "Option name must be a symbol") unless name.kind_of?(Symbol) @options[name.to_sym] = args end
options()
click to toggle source
options=(val)
click to toggle source
use_separate_default_options(true_or_false)
click to toggle source
When this setting is set to true
, default values supplied to the mixlib-cli DSL will be stored in a separate Hash
# File lib/mixlib/cli.rb, line 83 def use_separate_default_options(true_or_false) @separate_default_options = true_or_false end
use_separate_defaults?()
click to toggle source
# File lib/mixlib/cli.rb, line 87 def use_separate_defaults? @separate_default_options ||= false end