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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Relationship.


49
50
51
# File 'lib/openxml/parts/rels.rb', line 49

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

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id


48
49
50
# File 'lib/openxml/parts/rels.rb', line 48

def id
  @id
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target


48
49
50
# File 'lib/openxml/parts/rels.rb', line 48

def target
  @target
end

#target_modeObject

Returns the value of attribute target_mode

Returns:

  • (Object)

    the current value of target_mode


48
49
50
# File 'lib/openxml/parts/rels.rb', line 48

def target_mode
  @target_mode
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type


48
49
50
# File 'lib/openxml/parts/rels.rb', line 48

def type
  @type
end