Class: Odf::Utils::Xml

Inherits:
Nokogiri::XML::Document
  • Object
show all
Defined in:
lib/odf/utils/xml.rb

Instance Method Summary collapse

Instance Method Details

#add_element(name, value = nil, **attributes) ⇒ Object



4
5
6
# File 'lib/odf/utils/xml.rb', line 4

def add_element(name, value = nil, **attributes)
  root.add_child(create_element(name, value, attributes))
end

#add_element_into(element, name, value = nil, **attributes) ⇒ Object



8
9
10
# File 'lib/odf/utils/xml.rb', line 8

def add_element_into(element, name, value = nil, **attributes)
  element.add_child(create_element(name, value, attributes))
end