Class: Docxer::Properties::App

Inherits:
Object
  • Object
show all
Defined in:
lib/docxer/properties/app.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ App

Returns a new instance of App.



7
8
9
# File 'lib/docxer/properties/app.rb', line 7

def initialize(options)
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/docxer/properties/app.rb', line 5

def options
  @options
end

Instance Method Details

#documentObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/docxer/properties/app.rb', line 11

def document
  Nokogiri::XML::Builder.with(Nokogiri::XML('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')) do |xml|
    xml.Properties('xmlns' => "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties", 'xmlns:vt' => "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes") do
      xml.Template "Normal.dotm"
      xml.TotalTime 0
      xml.Pages 1
      xml.Words 0
      xml.Characters 0
      xml.Application "Docxer Ruby Gem"
      xml.DocSecurity 0
      xml.Lines 0
      xml.Paragraphs 0
      xml.ScaleCrop false
      xml.Company options[:creator]
      xml.LinksUpToDate false
      xml.CharactersWithSpaces 0
      xml.SharedDoc false
      xml.HyperlinksChanged false
      xml.AppVersion "14.0000"
    end
  end
end