instance method
OptionParser::AC#ac_arg_with
ac_arg_with(name, help_string, &block)
lib/optparse/ac.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/optparse/ac.rb, line 58
def ac_arg_with(name, help_string, &block)
_check_ac_args(name, block)
sdesc = []
ldesc = ["--with-#{name}"]
desc = [help_string]
q = name.downcase
with = Switch::PlacedArgument.new(*search(:atype, String), sdesc, ldesc, nil, desc, block)
without = Switch::NoArgument.new(nil, proc {}, sdesc, ldesc, nil, desc, block)
top.append(with, [], ["with-" + q], without, ['without-' + q])
with
end
Define --with / --without style option
Appears as --with-<i>name</i> in help message.