Class | OptionParser::ParseError
In: | optparse.rb
Parent: | RuntimeError

### Methods

inspect message new reason recover set_option to_s to_str

### Constants

Reason | = | 'parse error'.freeze

### Attributes

args | [R] |
reason | [W] |

### Public Class methods

new(*args)

[Source]

    # File optparse.rb, line 1625
        def initialize(*args)
          @args = args
          @reason = nil
        end

### Public Instance methods

inspect()

[Source]

    # File optparse.rb, line 1651
        def inspect
          "#<#{self.class.to_s}: #{args.join(' ')}>"
        end

message()

[Source]

    # File optparse.rb, line 1655
        def message
          reason + ': ' + args.join(' ')
        end

reason()

[Source]

    # File optparse.rb, line 1647
        def reason
          @reason || self.class::Reason
        end

recover(argv)

[Source]

    # File optparse.rb, line 1633
        def recover(argv)
          argv[0, 0] = @args
          argv
        end

set_option(opt, eq)

[Source]

    # File optparse.rb, line 1638
        def set_option(opt, eq)
          if eq
            @args[0] = opt
          else
            @args.unshift(opt)
          end
          self
        end

to_s()

Alias for message

to_str()

Alias for message

[Validate]