Class: Docxer::Properties

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

Defined Under Namespace

Classes: App, Core

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Properties

Returns a new instance of Properties.



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

def initialize(options)
  @options = options
end

Instance Attribute Details

#appObject

Returns the value of attribute app.



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

def app
  @app
end

#coreObject

Returns the value of attribute core.



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

def core
  @core
end

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

Instance Method Details

#render(zip) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/docxer/properties.rb', line 20

def render(zip)
  zip.put_next_entry('docProps/app.xml')
  zip.write(Docxer.to_xml(app.document))

  zip.put_next_entry('docProps/core.xml')
  zip.write(Docxer.to_xml(core.document))
end