Class: UberS3::Util::XmlDocument

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

Defined Under Namespace

Classes: NokogiriParser, RexmlParser

Instance Method Summary collapse

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