123456789_123456789_123456789_123456789_123456789_

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

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Gem::OptionParser::Switch
Defined in: lib/rubygems/vendor/optparse/lib/optparse.rb

Overview

::Gem::OptionParser::Switch that takes no arguments.

Class Method Summary

::Gem::OptionParser::Switch - Inherited

.guess

Guesses argument style from #arg.

.incompatible_argument_styles, .new, .pattern

Instance Attribute Summary

Instance Method Summary

::Gem::OptionParser::Switch - Inherited

#summarize

Produces the summary text.

#switch_name

Main name of the switch.

#add_banner, #compsys, #match_nonswitch?, #omitted_argument, #pretty_print, #pretty_print_contents,
#conv_arg

Parses argument, converts and returns #arg, #block and result of conversion.

#parse_arg

Parses #arg and returns rest of #arg and matched portion to the argument pattern.

Constructor Details

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

Class Method Details

.incompatible_argument_styles

This method is for internal use only.
[ GitHub ]

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

def self.incompatible_argument_styles(*) # :nodoc:
end

.pattern

This method is for internal use only.
[ GitHub ]

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

def self.pattern          # :nodoc:
  Object
end

Instance Method Details

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

Raises an exception if any arguments given.

Yields:

[ GitHub ]

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

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

#pretty_head

This method is for internal use only.
[ GitHub ]

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

def pretty_head           # :nodoc:
  "NoArgument"
end