Class: UberS3::Util::XmlDocument
- Inherits:
-
Object
- Object
- UberS3::Util::XmlDocument
- Defined in:
- lib/uber-s3/util/xml_document.rb
Defined Under Namespace
Classes: NokogiriParser, RexmlParser
Instance Method Summary collapse
-
#initialize(xml) ⇒ XmlDocument
constructor
A new instance of XmlDocument.
- #method_missing(sym, *args, &block) ⇒ Object
Constructor Details
#initialize(xml) ⇒ XmlDocument
Returns a new instance of XmlDocument.
10 11 12 13 14 15 16 |
# File 'lib/uber-s3/util/xml_document.rb', line 10 def initialize(xml) if defined?(Nokogiri) @parser = NokogiriParser.new(xml) else @parser = RexmlParser.new(xml) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
18 19 20 |
# File 'lib/uber-s3/util/xml_document.rb', line 18 def method_missing(sym, *args, &block) @parser.send sym, *args, &block end |