Class: OptSimple::Argument
Overview
A mandatory parameter, with one or more argument following it. ‘switches’ can be a String or an Array of Strings, and specifies the switches expected on the CL. ‘help’ provides a description of the parameter, and ‘metavar’ will be used in the usage statement. and an optional block can do parameter validation/transformation. If no block is given, then the strings specified (after the leading ‘-’s removed) will be used as keys in the Result and the values set to the arg following the switch the args array.
Instance Attribute Summary
Attributes inherited from Parameter
#block, #metavar, #param_options, #switches
Instance Method Summary collapse
-
#mandatory? ⇒ Boolean
returns true in an Argument.
Methods inherited from Option
#accumulate_opt, #initialize, #switch_len, #switch_str
Methods inherited from Parameter
#error, #help_str, #initialize, #names, #set_opt, #switch_len, #switch_str
Constructor Details
This class inherits a constructor from OptSimple::Option
Instance Method Details
#mandatory? ⇒ Boolean
returns true in an Argument
481 |
# File 'lib/opt_simple.rb', line 481 def mandatory?; true; end |