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.4/OptionParser/Switch/RequiredArgument.html below:

class OptionParser::Switch::RequiredArgument - Documentation for Ruby 3.4

  1. OptionParser::
  2. Switch::
  3. RequiredArgument
class OptionParser::Switch::RequiredArgument

Switch that takes an argument.

Public Instance Methods parse (arg, argv, &_)

Source

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

Raises an exception if argument is not present.


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