Class: IIIFManifest::V3::ManifestBuilder::PlaceholderCanvasBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/iiif_manifest/v3/manifest_builder/placeholdercanvas_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(placeholder_content, canvas_path, iiif_placeholder_canvas_factory:, iiif_annotation_page_factory:, content_builder:) ⇒ PlaceholderCanvasBuilder

Returns a new instance of PlaceholderCanvasBuilder.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/iiif_manifest/v3/manifest_builder/placeholdercanvas_builder.rb', line 7

def initialize(placeholder_content,
               canvas_path,
               iiif_placeholder_canvas_factory:,
               iiif_annotation_page_factory:,
               content_builder:)
  @placeholder_content = placeholder_content
  @canvas_path = canvas_path
  @iiif_placeholder_canvas_factory = iiif_placeholder_canvas_factory
  @iiif_annotation_page_factory = iiif_annotation_page_factory
  @content_builder = content_builder
end

Instance Attribute Details

#canvas_pathObject (readonly)

Returns the value of attribute canvas_path.



5
6
7
# File 'lib/iiif_manifest/v3/manifest_builder/placeholdercanvas_builder.rb', line 5

def canvas_path
  @canvas_path
end

#content_builderObject (readonly)

Returns the value of attribute content_builder.



5
6
7
# File 'lib/iiif_manifest/v3/manifest_builder/placeholdercanvas_builder.rb', line 5

def content_builder
  @content_builder
end

#iiif_annotation_page_factoryObject (readonly)

Returns the value of attribute iiif_annotation_page_factory.



5
6
7
# File 'lib/iiif_manifest/v3/manifest_builder/placeholdercanvas_builder.rb', line 5

def iiif_annotation_page_factory
  @iiif_annotation_page_factory
end

#iiif_placeholder_canvas_factoryObject (readonly)

Returns the value of attribute iiif_placeholder_canvas_factory.



5
6
7
# File 'lib/iiif_manifest/v3/manifest_builder/placeholdercanvas_builder.rb', line 5

def iiif_placeholder_canvas_factory
  @iiif_placeholder_canvas_factory
end

#placeholder_contentObject (readonly)

Returns the value of attribute placeholder_content.



5
6
7
# File 'lib/iiif_manifest/v3/manifest_builder/placeholdercanvas_builder.rb', line 5

def placeholder_content
  @placeholder_content
end

Instance Method Details

#buildObject



19
20
21
22
23
24
25
26
# File 'lib/iiif_manifest/v3/manifest_builder/placeholdercanvas_builder.rb', line 19

def build
  return nil if placeholder_content.nil?

  build_placeholder_canvas
  attach_content

  placeholder_canvas
end