class OpenXml::Xlsx::Elements::Relationship

Public Class Methods

new(type, target, id=nil) click to toggle source
Calls superclass method
# File lib/openxml/xlsx/elements/relationship.rb, line 8
def initialize(type, target, id=nil)
  id ||= "R#{SecureRandom.hex}"
  super type, target, id
end

Public Instance Methods

to_xml(xml) click to toggle source
# File lib/openxml/xlsx/elements/relationship.rb, line 13
def to_xml(xml)
  xml.Relationship("Id" => id, "Type" => type, "Target" => target)
end