class OptionParser::Switch::NoArgument

Switch that takes no arguments.

Public Instance Methods

parse(arg, argv) { |NeedlessArgument, arg| ... } click to toggle source

Raises an exception if any arguments given.

# File optparse.rb, line 717
def parse(arg, argv)
  yield(NeedlessArgument, arg) if arg
  conv_arg(arg)
end