method
with
ruby latest stable - Class:
OptionParser
with(*args, &block)public
Initializes a new instance and evaluates the optional block in context of the instance. Arguments args are passed to #new, see there for description of parameters.
This method is deprecated, its behavior corresponds to the older #new method.
# File lib/optparse.rb, line 1026
def self.with(*args, &block)
opts = new(*args)
opts.instance_eval(&block)
opts
end