Class: OpenXml::Elements::Relationship

Inherits:
Struct
  • Object
show all
Defined in:
lib/openxml/relationship.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.



4
5
6
# File 'lib/openxml/relationship.rb', line 4

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



3
4
5
# File 'lib/openxml/relationship.rb', line 3

def id
  @id
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



3
4
5
# File 'lib/openxml/relationship.rb', line 3

def target
  @target
end

#target_modeObject

Returns the value of attribute target_mode

Returns:

  • (Object)

    the current value of target_mode



3
4
5
# File 'lib/openxml/relationship.rb', line 3

def target_mode
  @target_mode
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



3
4
5
# File 'lib/openxml/relationship.rb', line 3

def type
  @type
end