lib/rocx/parts/document.rb in rocx-0.5.6 vs lib/rocx/parts/document.rb in rocx-0.5.7

- old
+ new

@@ -9,19 +9,18 @@ def <<(child) children << child end - def read - xml = build_xml do |xml| + def to_xml + build_xml do |xml| xml.document(root_namespaces) { xml.parent.namespace = xml.parent.namespace_definitions.find { |ns| ns.prefix == 'w' } xml['w'].body { children.each { |child| child.to_xml(xml) } } } end - strip_whitespace(xml) end private def root_namespaces