Switch
that can omit argument.
Instance Methods
lib/optparse.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/optparse.rb, line 763
def parse(arg, argv, &error)
if arg
conv_arg(*parse_arg(arg, &error))
else
omitted_argument conv_arg(arg)
end
end
Parses argument if given, or uses default value.