Class Cri::Command::OptionParserPartitioningDelegate
In: lib/cri/command.rb
Parent: Object

Delegate used for partitioning the list of arguments and options. This delegate will stop the parser as soon as the first argument, i.e. the command, is found.

@api private

Methods

Attributes

last_argument  [R]  Returns the last parsed argument, which, in this case, will be the first argument, which will be either nil or the command name.

@return [String] The last parsed argument.

Public Instance methods

Called when an argument is parsed.

@param [String] argument The argument

@param [Cri::OptionParser] option_parser The option parser

@return [void]

Called when an option is parsed.

@param [Symbol] key The option key (derived from the long format)

@param value The option value

@param [Cri::OptionParser] option_parser The option parser

@return [void]

[Validate]