Class: UberS3::Util::XmlDocument::RexmlParser
- Inherits:
-
Object
- Object
- UberS3::Util::XmlDocument::RexmlParser
- Defined in:
- lib/uber-s3/util/xml_document.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(xml) ⇒ RexmlParser
constructor
A new instance of RexmlParser.
- #xpath(path) ⇒ Object
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
#doc ⇒ Object
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 |