class RubyXL::OOXMLRelationshipsFile

Public Instance Methods

find_by_rid(r_id) click to toggle source
# File lib/rubyXL/objects/relationships.rb, line 35
def find_by_rid(r_id)
  relationships.find { |r| r.id == r_id }
end
find_by_target(target) click to toggle source
# File lib/rubyXL/objects/relationships.rb, line 39
def find_by_target(target)
  relationships.find { |r| r.target == target }
end

Protected Instance Methods

document_relationship(target, type) click to toggle source
# File lib/rubyXL/objects/relationships.rb, line 21
def document_relationship(target, type)
  RubyXL::Relationship.new(:id => "rId#{relationships.size + 1}", 
                           :type => "http://schemas.openxmlformats.org/officeDocument/2006/relationships/#{type}",
                           :target => target)
end
metadata_relationship(target, type) click to toggle source
# File lib/rubyXL/objects/relationships.rb, line 28
def metadata_relationship(target, type)
  RubyXL::Relationship.new(:id => "rId#{relationships.size + 1}", 
                           :type => "http://schemas.openxmlformats.org/package/2006/relationships/metadata/#{type}",
                           :target => target)
end