Class: Docxer::Document

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDocument

Returns a new instance of Document.



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

def initialize
  
end

Instance Attribute Details

#content_typesObject

Returns the value of attribute content_types.



4
5
6
# File 'lib/docxer/document.rb', line 4

def content_types
  @content_types
end

#documentObject

Returns the value of attribute document.



4
5
6
# File 'lib/docxer/document.rb', line 4

def document
  @document
end

#propertiesObject

Returns the value of attribute properties.



4
5
6
# File 'lib/docxer/document.rb', line 4

def properties
  @properties
end

#relationshipsObject

Returns the value of attribute relationships.



4
5
6
# File 'lib/docxer/document.rb', line 4

def relationships
  @relationships
end

Instance Method Details

#renderObject



26
27
28
29
30
31
32
33
# File 'lib/docxer/document.rb', line 26

def render
  Zip::ZipOutputStream.write_buffer do |zip|
    document.render(zip)
    properties.render(zip)
    relationships.render(zip)
    content_types.render(zip)
  end
end