Class: RipperTags::ForgivingOptionParser
- Inherits:
-
OptionParser
- Object
- OptionParser
- RipperTags::ForgivingOptionParser
- Defined in:
- lib/ripper-tags.rb
Instance Attribute Summary collapse
-
#ignore_unsupported_options ⇒ Object
Returns the value of attribute ignore_unsupported_options.
Instance Method Summary collapse
Instance Attribute Details
#ignore_unsupported_options ⇒ Object
Returns the value of attribute ignore_unsupported_options.
36 37 38 |
# File 'lib/ripper-tags.rb', line 36 def end |
Instance Method Details
#parse(argv) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/ripper-tags.rb', line 38 def parse(argv) argv = argv.dup exceptions = [] remaining = [] while argv.size > 0 begin remaining = super(argv) break rescue OptionParser::InvalidOption => err argv -= err.args exceptions << err end end if exceptions.any? && ! raise exceptions.first end remaining end |