Sha256: f47d9327035a1110f4bdb158a5178f9e86279045bc26d62b6e3bdb29e839f55f

Contents?: true

Size: 501 Bytes

Versions: 8

Compression:

Stored size: 501 Bytes

Contents


module XMLParserWrapper
  def parse_and_report(file, const, report_method=:report)
    parse_and_report_string(IO.read(file), const, report_method)
  end

  def parse_and_report_string(string, const, report_method=:report)
    parser = self.class.const_get(const).new
    parser.parse(string)
    parser.send(report_method)
  end

  def parse_and_report_io(io, const, report_method=:report) 
    parser = self.class.const_get(const).new
    parser.parse(io)
    parser.send(report_method)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mspire-0.4.9 lib/xmlparser_wrapper.rb
mspire-0.3.0 lib/xmlparser_wrapper.rb
mspire-0.3.9 lib/xmlparser_wrapper.rb
mspire-0.3.1 lib/xmlparser_wrapper.rb
mspire-0.4.2 lib/xmlparser_wrapper.rb
mspire-0.4.4 lib/xmlparser_wrapper.rb
mspire-0.4.5 lib/xmlparser_wrapper.rb
mspire-0.4.7 lib/xmlparser_wrapper.rb