Individual switch class. Not important to the user.

Defined within Switch are several Switch-derived classes: NoArgument, RequiredArgument, etc.

Attributes
Read
No documentation available
Read
No documentation available
Read
No documentation available
Read
No documentation available

arg

Read
No documentation available
Read
No documentation available
Read
No documentation available
Class Methods

Guesses argument style from arg. Returns corresponding OptionParser::Switch class (OptionalArgument, etc.).

No documentation available
No documentation available
No documentation available
Instance Methods

Parses argument, converts and returns arg, block and result of conversion. Yields at semi-error condition instead of raising an exception.

Parses arg and returns rest of arg and matched portion to the argument pattern. Yields when the pattern doesn’t match substring.

Produces the summary text. Each line of the summary is yielded to the block (without newline).

sdone

Already summarized short style options keyed hash.

ldone

Already summarized long style options keyed hash.

width

Width of left side (option part). In other words, the right side (description part) starts after width columns.

max

Maximum width of left side -> the options are filled within max columns.

indent

Prefix string indents all summarized lines.

Main name of the switch.