lib/fig/command/options/parser.rb
# This class knows way too much about how OptionParser works.
This class knows way too much about how OptionParser works.
This class knows way too much about how OptionParser works .
def parse!(argv)
    begin
      @parser.parse!(argv)
    rescue OptionParser::InvalidArgument => error
      raise_invalid_argument(error.args[0], error.args[1])
    rescue OptionParser::MissingArgument => error
      raise_missing_argument(error.args[0])
    rescue OptionParser::InvalidOption => error
      raise Fig::Command::OptionError.new(
        "Unknown option #{error.args[0]}.\n\n#{SHORT_USAGE}"
      )
    rescue OptionParser::ParseError => error
      raise Fig::Command::OptionError.new(error.to_s)
    end
    return
  end
def parse! ( argv ) begin @parser . parse! ( argv ) rescue OptionParser :: InvalidArgument => error raise_invalid_argument ( error . args [ 0 ] , error . args [ 1 ] ) rescue OptionParser :: MissingArgument => error raise_missing_argument ( error . args [ 0 ] ) rescue OptionParser :: InvalidOption => error raise Fig :: Command :: OptionError . new ( "Unknown option #{error.args[0]}.\n\n#{SHORT_USAGE}" ) rescue OptionParser :: ParseError => error raise Fig :: Command :: OptionError . new ( error . to_s ) end return end
This class knows way too much about how OptionParser works.
This class knows way too much about how OptionParser works .
argv