Class: XMLObject::Adapters::Base::Element
- Inherits:
-
Object
- Object
- XMLObject::Adapters::Base::Element
- Defined in:
- lib/xml-object/adapters.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
:nodoc:.
-
#children ⇒ Object
:nodoc:.
-
#name ⇒ Object
:nodoc:.
-
#raw ⇒ Object
:nodoc:.
-
#value ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Element
constructor
A new instance of Element.
Constructor Details
#initialize(*args) ⇒ Element
Returns a new instance of Element.
12 13 14 15 16 |
# File 'lib/xml-object/adapters.rb', line 12 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
#attributes ⇒ Object
:nodoc:
10 11 12 |
# File 'lib/xml-object/adapters.rb', line 10 def attributes @attributes end |
#children ⇒ Object
:nodoc:
10 11 12 |
# File 'lib/xml-object/adapters.rb', line 10 def children @children end |
#name ⇒ Object
:nodoc:
10 11 12 |
# File 'lib/xml-object/adapters.rb', line 10 def name @name end |
#raw ⇒ Object
:nodoc:
10 11 12 |
# File 'lib/xml-object/adapters.rb', line 10 def raw @raw end |
#value ⇒ Object
:nodoc:
10 11 12 |
# File 'lib/xml-object/adapters.rb', line 10 def value @value end |