Class: Gem::OptionParser::Switch::NoArgument

Inherits:
Gem::OptionParser::Switch show all
Defined in:
lib/rubygems/optparse/lib/optparse.rb

Overview

Switch that takes no arguments.

Instance Attribute Summary

Attributes inherited from Gem::OptionParser::Switch

#arg, #block, #conv, #desc, #long, #pattern, #short

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Gem::OptionParser::Switch

#add_banner, #compsys, guess, #initialize, #match_nonswitch?, #summarize, #switch_name

Constructor Details

This class inherits a constructor from Gem::OptionParser::Switch

Class Method Details

.incompatible_argument_stylesObject



690
691
# File 'lib/rubygems/optparse/lib/optparse.rb', line 690

def self.incompatible_argument_styles(*)
end

.patternObject



693
694
695
# File 'lib/rubygems/optparse/lib/optparse.rb', line 693

def self.pattern
  Object
end

Instance Method Details

#parse(arg, argv) {|NeedlessArgument, arg| ... } ⇒ Object

Raises an exception if any arguments given.

Yields:



685
686
687
688
# File 'lib/rubygems/optparse/lib/optparse.rb', line 685

def parse(arg, argv)
  yield(NeedlessArgument, arg) if arg
  conv_arg(arg)
end