Class: Docxi::Document
- Inherits:
-
Object
- Object
- Docxi::Document
- Defined in:
- lib/docxi/document.rb
Instance Attribute Summary collapse
-
#content_types ⇒ Object
Returns the value of attribute content_types.
-
#document ⇒ Object
Returns the value of attribute document.
-
#options ⇒ Object
Returns the value of attribute options.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#relationships ⇒ Object
Returns the value of attribute relationships.
Instance Method Summary collapse
-
#initialize(options = {top: 720,right: 1440,left: 1440,bottom: 720,footer: 200, header: 190}) ⇒ Document
constructor
A new instance of Document.
- #render ⇒ Object
Constructor Details
#initialize(options = {top: 720,right: 1440,left: 1440,bottom: 720,footer: 200, header: 190}) ⇒ Document
Returns a new instance of Document.
6 7 8 |
# File 'lib/docxi/document.rb', line 6 def initialize( = {top: 720,right: 1440,left: 1440,bottom: 720,footer: 200, header: 190}) @options = end |
Instance Attribute Details
#content_types ⇒ Object
Returns the value of attribute content_types.
4 5 6 |
# File 'lib/docxi/document.rb', line 4 def content_types @content_types end |
#document ⇒ Object
Returns the value of attribute document.
4 5 6 |
# File 'lib/docxi/document.rb', line 4 def document @document end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/docxi/document.rb', line 4 def @options end |
#properties ⇒ Object
Returns the value of attribute properties.
4 5 6 |
# File 'lib/docxi/document.rb', line 4 def properties @properties end |
#relationships ⇒ Object
Returns the value of attribute relationships.
4 5 6 |
# File 'lib/docxi/document.rb', line 4 def relationships @relationships end |
Instance Method Details
#render ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/docxi/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 |