| Class | ParseError |
| In: |
lib/optparse.rb
|
| Parent: | RuntimeError |
Base class of exceptions from OptionParser.
| Reason | = | 'parse error'.freeze | Reason which caused the error. |
| args | [R] | |
| reason | [W] |
# File lib/optparse.rb, line 1591
1591: def initialize(*args)
1592: @args = args
1593: @reason = nil
1594: end
# File lib/optparse.rb, line 1623
1623: def inspect
1624: "#<#{self.class.to_s}: #{args.join(' ')}>"
1625: end
Pushes back erred argument(s) to argv.
# File lib/optparse.rb, line 1602
1602: def recover(argv)
1603: argv[0, 0] = @args
1604: argv
1605: end