ArgParser
A powerful argument parser which uses a class or struct to define the arguments and their types.
Constants
https://en.wikipedia.org/wiki/Quotation_mark#Summary_table
Constructors
Class methods
Convert the string input into an array of tokens. Quoted values should be considered one token, but everything else should be split by spaces. Should work with all types of quotes, and handle nested quotes. Unmatched quotes should be considered part of the token.
Example:
input = %q{foo "bar baz" "qux \\"quux" "corge grault}
tokenize(input) # => ["foo", "bar baz", "qux \"quux", "\"corge", "grault"]
Instance methods
Called when a value cannot be converted to the expected type.
Note: You can override this method to change the way conversion errors are handled.
Called when a required attribute is missing.
Note: You can override this method to change the way missing attributes are handled.
Called when an unknown attribute is found.
Note: You can override this method to change the way unknown attributes are handled.
Called when a validation error occurs.
Note: You can override this method to change the way validation errors are handled.
Nested types
- ArgParser::CommaSeparatedArrayConverter(SubConverter)
- ArgParser::ConversionError
- ArgParser::EnumNameConverter(E)
- ArgParser::EnumValueConverter(E)
- ArgParser::EpochConverter
- ArgParser::EpochMillisConverter
- ArgParser::Error
- ArgParser::Field
- ArgParser::MissingAttributeError
- ArgParser::UnknownAttributeError
- ArgParser::Validate
- ArgParser::ValidationError
- ArgParser::Validator
- ArgParser::Validators