Module: MobyUtil::XML::Nokogiri::Document

Includes:
Node
Defined in:
lib/tdriver/util/xml/parsers/nokogiri/document.rb

Overview

behaviour

Instance Method Summary collapse

Methods included from Node

#<=>, #==, #[], #[]=, #add_previous_sibling, #at_xpath, #attribute, #attributes, #blank?, #children, #content, #each, #inner_html, #parent, #remove, #replace, #to_s, #xpath

Methods included from Abstraction

#name, #nil?, #size, #to_s

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MobyUtil::XML::Nokogiri::Abstraction

Instance Method Details

#initialize(xml, options = {}) ⇒ Object

TODO: document me



31
32
33
34
35
36
37
38
39
# File 'lib/tdriver/util/xml/parsers/nokogiri/document.rb', line 31

def initialize( xml, options = {} )

  @options = options

  initialize_cache
  
  @xml = parse( xml )

end

#rootObject

TODO: document me



42
43
44
45
46
# File 'lib/tdriver/util/xml/parsers/nokogiri/document.rb', line 42

def root
  
  cache( :root, :value ){ node_object( @xml.root ) }

end