class Caracal::Renderers::AppRenderer

Public Instance Methods

to_xml() click to toggle source

This method produces the xml required for the `docProps/app.xml` sub-document.

# File lib/caracal/renderers/app_renderer.rb, line 17
def to_xml
  builder = ::Nokogiri::XML::Builder.with(declaration_xml) do |xml|
    xml.send 'Properties', root_options do
      xml.send 'Application', 'Caracal'
    end
  end
  builder.to_xml(save_options)
end

Private Instance Methods

root_options() click to toggle source
# File lib/caracal/renderers/app_renderer.rb, line 32
def root_options
  {
    'xmlns'    => 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties',
    'xmlns:vt' => 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'
  }
end