Class: IIIFManifest::V3::ManifestBuilder::PlaceholderCanvasBuilder
- Inherits:
-
Object
- Object
- IIIFManifest::V3::ManifestBuilder::PlaceholderCanvasBuilder
- Defined in:
- lib/iiif_manifest/v3/manifest_builder/placeholdercanvas_builder.rb
Instance Attribute Summary collapse
-
#canvas_path ⇒ Object
readonly
Returns the value of attribute canvas_path.
-
#content_builder ⇒ Object
readonly
Returns the value of attribute content_builder.
-
#iiif_annotation_page_factory ⇒ Object
readonly
Returns the value of attribute iiif_annotation_page_factory.
-
#iiif_placeholder_canvas_factory ⇒ Object
readonly
Returns the value of attribute iiif_placeholder_canvas_factory.
-
#placeholder_content ⇒ Object
readonly
Returns the value of attribute placeholder_content.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(placeholder_content, canvas_path, iiif_placeholder_canvas_factory:, iiif_annotation_page_factory:, content_builder:) ⇒ PlaceholderCanvasBuilder
constructor
A new instance of PlaceholderCanvasBuilder.
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_path ⇒ Object (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_builder ⇒ Object (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_factory ⇒ Object (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_factory ⇒ Object (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_content ⇒ Object (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
#build ⇒ Object
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 |