Sha256: 0ee2df045bfd7d30c9938c5c2fa04c1fd5975c2dfae6c9748eaf1a6a0ff362e2
Contents?: true
Size: 931 Bytes
Versions: 11
Compression:
Stored size: 931 Bytes
Contents
# encoding: UTF-8 module Axlsx require 'axlsx/rels/relationship.rb' # Relationships are a collection of Relations that define how package parts are related. # @note The package automatically manages releationships. class Relationships < SimpleTypedList # Creates a new Relationships collection based on SimpleTypedList def initialize super Relationship end # The relationship instance for the given source object, or nil if none exists. # @see Relationship#source_obj # @return [Relationship] def for(source_obj) find{ |rel| rel.source_obj == source_obj } end # serialize relationships # @param [String] str # @return [String] def to_xml_string(str = '') str << '<?xml version="1.0" encoding="UTF-8"?>' str << ('<Relationships xmlns="' << RELS_R << '">') each{ |rel| rel.to_xml_string(str) } str << '</Relationships>' end end end
Version data entries
11 entries across 11 versions & 3 rubygems