Class: Uniword::Ooxml::Relationships::ImageRelationship

Inherits:
Relationship
  • Object
show all
Defined in:
lib/uniword/ooxml/relationships/image_relationship.rb

Overview

Image relationship type

Used for image relationships in documents

Instance Method Summary collapse

Constructor Details

#initialize(id:, target:) ⇒ ImageRelationship

Returns a new instance of ImageRelationship.

Parameters:

  • id (String)

    relationship ID (allocated by Docx::IdAllocator — the single rId authority)

  • target (String)

    image part target (e.g. "media/image1.png")



15
16
17
18
19
20
21
# File 'lib/uniword/ooxml/relationships/image_relationship.rb', line 15

def initialize(id:, target:)
  super(
    id: id,
    type: PartRegistry.find_by_key(:image).rel_type,
    target: target
  )
end