Class: GLI::GLIOptionParser::LegacyCommandOptionParser
- Inherits:
-
NormalCommandOptionParser
- Object
- GlobalOptionParser
- NormalCommandOptionParser
- GLI::GLIOptionParser::LegacyCommandOptionParser
- Defined in:
- lib/gli/gli_option_parser.rb
Instance Method Summary collapse
Methods inherited from NormalCommandOptionParser
Methods inherited from GlobalOptionParser
Constructor Details
This class inherits a constructor from GLI::GLIOptionParser::NormalCommandOptionParser
Instance Method Details
#parse!(parsing_result, argument_handling_strategy, autocomplete) ⇒ Object
195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/gli/gli_option_parser.rb', line 195 def parse!(parsing_result,argument_handling_strategy,autocomplete) command = parsing_result.command option_parser_factory = OptionParserFactory.for_command(command,@accepts) option_block_parser = LegacyCommandOptionBlockParser.new(option_parser_factory, self.error_handler) option_block_parser.command = command parsing_result.arguments = option_block_parser.parse!(parsing_result.arguments) parsing_result. = option_parser_factory. subcommand,args = find_subcommand(command,parsing_result.arguments,autocomplete) parsing_result.command = subcommand parsing_result.arguments = args (command.flags, parsing_result.command, parsing_result.) end |