Method: XmlEasy::Element#initialize
- Defined in:
- lib/xml_easy.rb
#initialize(name = nil) ⇒ Element
Returns a new instance of Element.
133 134 135 136 137 138 139 |
# File 'lib/xml_easy.rb', line 133 def initialize(name=nil) @parent = nil @name = name.to_sym if name @body = '' @attributes = HashWithIndifferentAccess.new @children = ElementList.new end |