| Class | OptionParser::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 1529
1529: def initialize(*args)
1530: @args = args
1531: @reason = nil
1532: end
# File lib/optparse.rb, line 1561
1561: def inspect
1562: "#<#{self.class.to_s}: #{args.join(' ')}>"
1563: end
Pushes back erred argument(s) to argv.
# File lib/optparse.rb, line 1540
1540: def recover(argv)
1541: argv[0, 0] = @args
1542: argv
1543: end