Module: XMLObject::Element

Defined in:
lib/xml-object/element.rb

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *a, &b) ⇒ Object (private)

:nodoc:



16
17
18
19
20
# File 'lib/xml-object/element.rb', line 16

def method_missing(m, *a, &b) # :nodoc:
  dp = __question_dispatch(m, *a, &b)
  dp = __dot_notation_dispatch(m, *a, &b) if dp.nil?
  dp
end

Class Method Details

.extended(obj) ⇒ Object

:nodoc:



2
3
4
5
6
# File 'lib/xml-object/element.rb', line 2

def self.extended(obj) # :nodoc:
  obj.instance_variable_set :@__children,   {}
  obj.instance_variable_set :@__attributes, {}
  obj
end

Instance Method Details

#raw_xmlObject

The raw, unadapted XML object. Whatever this is, it really depends on the current_adapter.



10
11
12
# File 'lib/xml-object/element.rb', line 10

def raw_xml
  @__adapted_element.raw if @__adapted_element
end