class Dmarcurator::Parser::Base
Base
XML parser
Attributes
doc[R]
Public Class Methods
new(xml: nil, parsed_xml: nil)
click to toggle source
# File lib/dmarcurator/parser/base.rb, line 11 def initialize(xml: nil, parsed_xml: nil) if xml content = File.read(xml) @doc = Ox.parse(content) elsif parsed_xml @doc = parsed_xml else raise "Either :xml or :parsed_xml are required" end end