# File lib/main/getoptlong.rb, line 45 def initialize(argv, *arguments) @argv = argv # # Current ordering. # if ENV.include?('POSIXLY_CORRECT') @ordering = REQUIRE_ORDER else @ordering = PERMUTE end # # Hash table of option names. # Keyes of the table are option names, and their values are canonical # names of the options. # @canonical_names = Hash.new # # Hash table of argument flags. # Keyes of the table are option names, and their values are argument # flags of the options. # @argument_flags = Hash.new # # Whether error messages are output to stderr. # @quiet = FALSE # # Status code. # @status = STATUS_YET # # Error code. # @error = nil # # Error message. # @error_message = nil # # Rest of catinated short options. # @rest_singles = '' # # List of non-option-arguments. # Append them to @argv when option processing is terminated. # @non_option_arguments = Array.new if 0 < arguments.length set_options(*arguments) end end