Class: UberS3::Util::XmlDocument::NokogiriParser

Inherits:
Object
  • Object
show all
Defined in:
lib/uber-s3/util/xml_document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ NokogiriParser

Returns a new instance of NokogiriParser.



37
38
39
40
# File 'lib/uber-s3/util/xml_document.rb', line 37

def initialize(xml)
  self.doc = Nokogiri::XML(xml)
  doc.remove_namespaces!
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



35
36
37
# File 'lib/uber-s3/util/xml_document.rb', line 35

def doc
  @doc
end

Instance Method Details

#xpath(path) ⇒ Object



42
43
44
# File 'lib/uber-s3/util/xml_document.rb', line 42

def xpath(path)
  doc.xpath(path).to_a
end