A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.ruby-lang.org/en/3.1/OptionParser/Switch/RequiredArgument.html below:

class OptionParser::Switch::RequiredArgument - RDoc Documentation

class OptionParser::Switch::RequiredArgument

Switch that takes an argument.

Public Instance Methods

parse(arg, argv) click to toggle source

Raises an exception if argument is not present.

# File lib/optparse.rb, line 706
def parse(arg, argv)
  unless arg
    raise MissingArgument if argv.empty?
    arg = argv.shift
  end
  conv_arg(*parse_arg(arg, &method(:raise)))
end

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4