class GLI::GLIOptionParser

Parses the command-line options using an actual OptionParser

Public Class Methods

new(commands,flags,switches,accepts,default_command = nil,subcommand_option_handling_strategy=:legacy) click to toggle source
# File lib/gli/gli_option_parser.rb, line 4
def initialize(commands,flags,switches,accepts,default_command = nil,subcommand_option_handling_strategy=:legacy)
   command_finder       = CommandFinder.new(commands,default_command || "help")
  @global_option_parser = GlobalOptionParser.new(OptionParserFactory.new(flags,switches,accepts),command_finder,flags)
  @accepts              = accepts
  @subcommand_option_handling_strategy = subcommand_option_handling_strategy
end