Class: OptionParser::Switch::NoArgument (Ruby 2.3.7)
Description: Class : OptionParser::Switch::NoArgument - Ruby 2.3.7

- Home
- Core 2.3.7
- Std-lib 2.3.7
- Downloads

Support for the Ruby 2.3 series has ended. See here for reference.

### Home Classes Methods

### In Files

- optparse.rb

### Parent

self

### Methods

- ::incompatible_argument_styles
- ::pattern
- #parse

### Class/Module Index

Quicksearch

- Object
- OptParse
- OptionParser
- OptionParser::AC
- OptionParser::Acceptables
- OptionParser::AmbiguousArgument
- OptionParser::AmbiguousOption
- OptionParser::Arguable
- OptionParser::CompletingHash
- OptionParser::Completion
- OptionParser::InvalidArgument
- OptionParser::InvalidOption
- OptionParser::List
- OptionParser::MissingArgument
- OptionParser::NeedlessArgument
- OptionParser::OptionMap
- OptionParser::ParseError
- OptionParser::Regexp
- OptionParser::Switch
- OptionParser::Switch::NoArgument
- OptionParser::Switch::OptionalArgument
- OptionParser::Switch::PlacedArgument
- OptionParser::Switch::RequiredArgument

No matching classes.

# OptionParser::Switch::NoArgument

Switch that takes no arguments.

### Public Class Methods

incompatible_argument_styles(*) click to toggle source

                   # File optparse.rb, line 654
    def self.incompatible_argument_styles(*)
    end

pattern() click to toggle source

                   # File optparse.rb, line 657
    def self.pattern
      Object
    end

### Public Instance Methods

parse(arg, argv) click to toggle source

Raises an exception if any arguments given.

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