Class: RipperTags::ForgivingOptionParser

Inherits:
OptionParser
  • Object
show all
Defined in:
lib/ripper-tags.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ignore_unsupported_optionsObject

Returns the value of attribute ignore_unsupported_options.



40
41
42
# File 'lib/ripper-tags.rb', line 40

def ignore_unsupported_options
  @ignore_unsupported_options
end

Instance Method Details

#load_options_file(file) ⇒ Object



42
43
44
45
46
47
# File 'lib/ripper-tags.rb', line 42

def load_options_file(file)
  @argv.unshift(*File.readlines(file).flat_map { |line|
    line.strip!.match(/(=|\s)/)
    ($1 == "" || $1 == "=") ? line : line.split(/\s+/, 2)
  })
end