Class: Docxer::Word::Relationships
- Inherits:
-
Object
- Object
- Docxer::Word::Relationships
- Defined in:
- lib/docxer/word/relationships.rb,
lib/docxer/word/relationships/relationship.rb
Defined Under Namespace
Classes: Relationship
Constant Summary collapse
- @@prefix =
'rId'
Instance Attribute Summary collapse
-
#relationships ⇒ Object
Returns the value of attribute relationships.
Instance Method Summary collapse
- #add(type, target) ⇒ Object
-
#initialize ⇒ Relationships
constructor
A new instance of Relationships.
- #render(zip) ⇒ Object
Constructor Details
#initialize ⇒ Relationships
Returns a new instance of Relationships.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/docxer/word/relationships.rb', line 10 def initialize @relationships = [] @counter = 0 add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", "styles.xml") add("http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects", "stylesWithEffects.xml") add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings", "settings.xml") add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings", "webSettings.xml") add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable", "fontTable.xml") add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", "theme/theme1.xml") add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes", "endnotes.xml") add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes", "footnotes.xml") add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering", "numbering.xml") end |
Instance Attribute Details
#relationships ⇒ Object
Returns the value of attribute relationships.
8 9 10 |
# File 'lib/docxer/word/relationships.rb', line 8 def relationships @relationships end |
Instance Method Details
#add(type, target) ⇒ Object
24 25 26 27 28 |
# File 'lib/docxer/word/relationships.rb', line 24 def add(type, target) relationship = create_relationship(sequence, type, target) @relationships << relationship if relationship relationship end |