module OptparsePlus

Constants

VERSION

Attributes

opt_plus[R]

Public Instance Methods

inherit_ruby_options(*short_option_names) click to toggle source
# File lib/optparse_plus.rb, line 160
def inherit_ruby_options(*short_option_names)
  @opt_plus.inherit_ruby_options(*short_option_names)
end
on(*args, &callback) click to toggle source
Calls superclass method
# File lib/optparse_plus.rb, line 142
def on(*args, &callback)
  if args.length == 1 and args[0].kind_of? Symbol
    on_with(*args, &callback)
  else
    super(*args)
  end
end
on_with(option_label, &callback) click to toggle source
# File lib/optparse_plus.rb, line 137
def on_with(option_label, &callback)
  args = @opt_plus.config_to_args(option_label)
  _orig_on(*args, callback)
end
parse!() click to toggle source
Calls superclass method
# File lib/optparse_plus.rb, line 150
def parse!
  @opt_plus.opt_on if @opt_plus
  super
end
setup_opt_plus(opt_plus) click to toggle source
# File lib/optparse_plus.rb, line 155
def setup_opt_plus(opt_plus)
  @opt_plus = opt_plus
  opt_plus.opt = self
end
with(option_label, &callback) click to toggle source
# File lib/optparse_plus.rb, line 132
def with(option_label, &callback)
  @opt_plus.callbacks[option_label] = callback
end