Class: UberS3::Util::XmlDocument::RexmlParser

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) ⇒ RexmlParser

Returns a new instance of RexmlParser.



25
26
27
# File 'lib/uber-s3/util/xml_document.rb', line 25

def initialize(xml)
  self.doc = REXML::Document.new(xml)
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



23
24
25
# File 'lib/uber-s3/util/xml_document.rb', line 23

def doc
  @doc
end

Instance Method Details

#xpath(path) ⇒ Object



29
30
31
# File 'lib/uber-s3/util/xml_document.rb', line 29

def xpath(path)
  REXML::XPath.match(doc.root, path)
end