module Mixlib::CLI::ClassMethods
def banner(bstring = nil)
=== Returns
bstring
=== Parameters
Usage: #{0} (options)
Change the banner. Defaults to:
def banner(bstring = nil) if bstring @banner = bstring else @banner ||= "Usage: #{$0} (options)" @banner end end
def option(name, args)
=== Returns
args
name
=== Parameters
Add a command line option.
def option(name, args) @options ||= {} raise(ArgumentError, "Option name must be a symbol") unless name.kind_of?(Symbol) @options[name.to_sym] = args end
def options
=== Returns
Get the hash of current options.
def options @options ||= {} @options end
def options=(val)
=== Returns
val
=== Parameters
Set the current options hash
def options=(val) raise(ArgumentError, "Options must recieve a hash") unless val.kind_of?(Hash) @options = val end
def use_separate_default_options(true_or_false)
When this setting is set to +true+, default values supplied to the
def use_separate_default_options(true_or_false) @separate_default_options = true_or_false end
def use_separate_defaults?
def use_separate_defaults? @separate_default_options ||= false end