Class: IIIFManifest::ManifestBuilder::CanvasBuilderFactory
- Inherits:
-
Object
- Object
- IIIFManifest::ManifestBuilder::CanvasBuilderFactory
- Defined in:
- lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#canvas_builder_factory ⇒ Object
readonly
Returns the value of attribute canvas_builder_factory.
-
#composite_builder ⇒ Object
readonly
Returns the value of attribute composite_builder.
Instance Method Summary collapse
- #from(work) ⇒ Object
-
#initialize(composite_builder:, canvas_builder_factory:) ⇒ CanvasBuilderFactory
constructor
A new instance of CanvasBuilderFactory.
Constructor Details
#initialize(composite_builder:, canvas_builder_factory:) ⇒ CanvasBuilderFactory
Returns a new instance of CanvasBuilderFactory.
5 6 7 8 |
# File 'lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb', line 5 def initialize(composite_builder:, canvas_builder_factory:) @composite_builder = composite_builder @canvas_builder_factory = canvas_builder_factory end |
Instance Attribute Details
#canvas_builder_factory ⇒ Object (readonly)
Returns the value of attribute canvas_builder_factory.
4 5 6 |
# File 'lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb', line 4 def canvas_builder_factory @canvas_builder_factory end |
#composite_builder ⇒ Object (readonly)
Returns the value of attribute composite_builder.
4 5 6 |
# File 'lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb', line 4 def composite_builder @composite_builder end |
Instance Method Details
#from(work) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb', line 10 def from(work) composite_builder.new( *file_set_presenters(work).map do |presenter| canvas_builder_factory.new(presenter, work) end ) end |