Class: Rubyword::Writer::Part::DocPropsApp

Inherits:
Base
  • Object
show all
Defined in:
lib/rubyword/writer/part/doc_props_app.rb

Instance Attribute Summary

Attributes inherited from Base

#rubyword, #section

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Rubyword::Writer::Part::Base

Instance Method Details

#writeObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/rubyword/writer/part/doc_props_app.rb', line 6

def write
      infomartion = @rubyword.doc_info
	builder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
		xml.Properties(xmlns: 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties', 
									'xmlns:vt' => 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes') do
			xml.Company(@rubyword.doc_info[:company])
			xml.Manager(@rubyword.doc_info[:creator])
		end
	end
	builder.to_xml
end