| 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 1597
1597: def initialize(*args)
1598: @args = args
1599: @reason = nil
1600: end
# File lib/optparse.rb, line 1629
1629: def inspect
1630: "#<#{self.class.to_s}: #{args.join(' ')}>"
1631: end
Pushes back erred argument(s) to argv.
# File lib/optparse.rb, line 1608
1608: def recover(argv)
1609: argv[0, 0] = @args
1610: argv
1611: end