Method: GLI::GLIOptionParser#initialize

Defined in:
lib/gli/gli_option_parser.rb

#initialize(commands, flags, switches, accepts, default_command = nil, subcommand_option_handling_strategy = :legacy) ⇒ GLIOptionParser

Returns a new instance of GLIOptionParser.



4
5
6
7
8
9
# 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)
  @accepts              = accepts
  @subcommand_option_handling_strategy = subcommand_option_handling_strategy
end