Module: MobyUtil::XML::Nokogiri::Abstraction

Includes:
Cache
Included in:
Attribute, Node, Nodeset
Defined in:
lib/tdriver/util/xml/parsers/nokogiri/abstraction.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object (private)

TODO: Documentation

Raises:

  • (RuntimeError)


152
153
154
155
156
# File 'lib/tdriver/util/xml/parsers/nokogiri/abstraction.rb', line 152

def method_missing( method, *args, &block )

  raise RuntimeError, "Method #{ method.to_s.inspect } is not supported by #{ self.class } object (#{ MobyUtil::XML.current_parser })"

end

Instance Method Details

#nameObject

TODO: Documentation



77
78
79
80
81
# File 'lib/tdriver/util/xml/parsers/nokogiri/abstraction.rb', line 77

def name

  cache( :name, :value ){ @xml.name }

end

#nil?Boolean Also known as: empty?

TODO: Documentation

Returns:

  • (Boolean)


84
85
86
87
88
# File 'lib/tdriver/util/xml/parsers/nokogiri/abstraction.rb', line 84

def nil?

  cache( :nil?, :value ){ @xml.nil? }

end

#sizeObject

TODO: Documentation



93
94
95
96
97
# File 'lib/tdriver/util/xml/parsers/nokogiri/abstraction.rb', line 93

def size

  cache( :size, :value ){ @xml.size }

end

#to_sObject

TODO: Documentation



100
101
102
103
104
# File 'lib/tdriver/util/xml/parsers/nokogiri/abstraction.rb', line 100

def to_s

  cache( :to_s, :value ){ @xml.to_s }

end