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