make_switch(opts, block = nil)
Instance Public methods
Creates an OptionParser::Switch from
the parameters. The parsed argument value is passed to the given block,
where it can be processed.
See at the beginning of OptionParser for
some full examples.
opts can include the following elements:
Argument style:
One of the following:
:NONE, :REQUIRED, :OPTIONAL
Argument pattern:
Acceptable option argument format, must be pre-defined with #accept or #accept, or Regexp. This can app