Class: OpenXml::Parts::Rels::Relationship

Inherits:
Struct
  • Object
show all
Defined in:
lib/open_xml/parts/rels.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, target, id = nil) ⇒ Relationship

Returns a new instance of Relationship.



47
48
49
# File 'lib/open_xml/parts/rels.rb', line 47

def initialize(type, target, id=nil)
  super type, target, id || "R#{SecureRandom.hex}"
end

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



46
47
48
# File 'lib/open_xml/parts/rels.rb', line 46

def id
  @id
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



46
47
48
# File 'lib/open_xml/parts/rels.rb', line 46

def target
  @target
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



46
47
48
# File 'lib/open_xml/parts/rels.rb', line 46

def type
  @type
end