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

### Methods

inspect message new reason recover set_option to_s

### Constants

Reason | = | 'parse error'.freeze

### Attributes

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

### Public Class methods

new(*args)

[Source]

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

### Public Instance methods

inspect()

[Source]

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

message()

[Source]

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

reason()

[Source]

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

recover(argv)

[Source]

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

set_option(opt, eq)

[Source]

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

to_s()

Alias for message

[Validate]