Class: Axlsx::Relationships
- Inherits:
-
SimpleTypedList
- Object
- SimpleTypedList
- Axlsx::Relationships
- Defined in:
- lib/axlsx/rels/relationships.rb
Overview
Note:
The package automatically manages releationships.
Relationships are a collection of Relations that define how package parts are related.
Instance Method Summary collapse
-
#initialize ⇒ Relationships
constructor
Creates a new Relationships collection based on SimpleTypedList.
- #to_xml_string(str = '') ⇒ Object
Constructor Details
#initialize ⇒ Relationships
Creates a new Relationships collection based on SimpleTypedList
10 11 12 |
# File 'lib/axlsx/rels/relationships.rb', line 10 def initialize super Relationship end |
Instance Method Details
#to_xml_string(str = '') ⇒ Object
14 15 16 17 18 19 |
# File 'lib/axlsx/rels/relationships.rb', line 14 def to_xml_string(str = '') str << '<?xml version="1.0" encoding="UTF-8"?>' str << '<Relationships xmlns="' << RELS_R << '">' each_with_index { |rel, index| rel.to_xml_string(index+1, str) } str << '</Relationships>' end |