class OpenXml::Part
Public Instance Methods
build_standalone_xml() { |xml| ... }
click to toggle source
# File lib/open_xml/part.rb, line 11 def build_standalone_xml xml = Nokogiri::XML("<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>") XML::Builder.with(xml) { |xml| yield xml }.to_xml end
build_xml() { |xml| ... }
click to toggle source
# File lib/open_xml/part.rb, line 7 def build_xml XML::Builder.new(encoding: "utf-8") { |xml| yield xml }.to_xml end
read()
click to toggle source
# File lib/open_xml/part.rb, line 16 def read strip_whitespace to_xml end
Also aliased as: content
to_xml()
click to toggle source
# File lib/open_xml/part.rb, line 21 def to_xml raise NotImplementedError end
Protected Instance Methods
strip_whitespace(xml)
click to toggle source
# File lib/open_xml/part.rb, line 27 def strip_whitespace(xml) xml.lines.map(&:strip).join end