Class: UberS3::Util::XmlDocument::NokogiriParser
- Inherits:
-
Object
- Object
- UberS3::Util::XmlDocument::NokogiriParser
- 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) ⇒ NokogiriParser
constructor
A new instance of NokogiriParser.
- #xpath(path) ⇒ Object
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
#doc ⇒ Object
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 |