Parent

Cri::Command::OptionParserPartitioningDelegate

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

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

argument_added(argument, option_parser) click to toggle source

Called when an argument is parsed.

@param [String] argument The argument

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

@return [void]

# File lib/cri/command.rb, line 40
def argument_added(argument, option_parser)
  @last_argument = argument
  option_parser.stop
end
option_added(key, value, option_parser) click to toggle source

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]

# File lib/cri/command.rb, line 30
def option_added(key, value, option_parser)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.