123456789_123456789_123456789_123456789_123456789_

Class: OptionParser::Switch::NoArgument

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

Overview

::OptionParser::Switch that takes no arguments.

Class Method Summary

Instance Attribute Summary

Instance Method Summary

::OptionParser::Switch - Inherited

#summarize

Produces the summary text.

#switch_name

Main name of the switch.

#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.

#add_banner, #compsys, #match_nonswitch?

Constructor Details

This class inherits a constructor from OptionParser::Switch

Class Method Details

.incompatible_argument_styles

[ GitHub ]

  
# File 'lib/optparse.rb', line 655

def self.incompatible_argument_styles(*)
end

.pattern

[ GitHub ]

  
# File 'lib/optparse.rb', line 658

def self.pattern
  Object
end

Instance Method Details

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

Raises an exception if any arguments given.

Yields:

[ GitHub ]

  
# File 'lib/optparse.rb', line 650

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