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

Inherits:
Gem::OptionParser::Switch show all
Defined in:
lib/rubygems/vendor/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?, #pretty_print, #pretty_print_contents, #summarize, #switch_name

Constructor Details

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

Class Method Details

.incompatible_argument_stylesObject



713
714
# File 'lib/rubygems/vendor/optparse/lib/optparse.rb', line 713

def self.incompatible_argument_styles(*)
end

.patternObject



716
717
718
# File 'lib/rubygems/vendor/optparse/lib/optparse.rb', line 716

def self.pattern
  Object
end

Instance Method Details

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

Raises an exception if any arguments given.

Yields:



708
709
710
711
# File 'lib/rubygems/vendor/optparse/lib/optparse.rb', line 708

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

#pretty_headObject

:nodoc:



720
721
722
# File 'lib/rubygems/vendor/optparse/lib/optparse.rb', line 720

def pretty_head           # :nodoc:
  "NoArgument"
end