Class: XMLObject::Adapters::Base::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/xml-object/adapters.rb

Overview

:nodoc:

Direct Known Subclasses

LibXML::Element, REXML::Element

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Element

Returns a new instance of Element.



11
12
13
14
15
# File 'lib/xml-object/adapters.rb', line 11

def initialize(*args)

	@children = @element_nodes.map { |node| self.class.new(node) }
	@value = (not (text_value !~ /\S/)) ? text_value : cdata_value
end

Instance Attribute Details

#attributesObject

:nodoc:



9
10
11
# File 'lib/xml-object/adapters.rb', line 9

def attributes
  @attributes
end

#childrenObject

:nodoc:



9
10
11
# File 'lib/xml-object/adapters.rb', line 9

def children
  @children
end

#nameObject

:nodoc:



9
10
11
# File 'lib/xml-object/adapters.rb', line 9

def name
  @name
end

#rawObject

:nodoc:



9
10
11
# File 'lib/xml-object/adapters.rb', line 9

def raw
  @raw
end

#valueObject

:nodoc:



9
10
11
# File 'lib/xml-object/adapters.rb', line 9

def value
  @value
end