Sha256: 409f73152c54745d370ba2f1037b26065b69ccb4318fbe737a316d50a06fc35d

Contents?: true

Size: 629 Bytes

Versions: 11

Compression:

Stored size: 629 Bytes

Contents

module IIIFManifest
  class ManifestBuilder
    class CanvasBuilderFactory
      attr_reader :composite_builder, :canvas_builder_factory
      def initialize(composite_builder:, canvas_builder_factory:)
        @composite_builder = composite_builder
        @canvas_builder_factory = canvas_builder_factory
      end

      def from(work)
        composite_builder.new(
          *file_set_presenters(work).map do |presenter|
            canvas_builder_factory.new(presenter, work)
          end
        )
      end

      private

      def file_set_presenters(work)
        work.file_set_presenters
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/iiif_manifest-1.5.0/lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
iiif_manifest-1.6.0 lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
iiif_manifest-1.5.0 lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
iiif_manifest-1.4.0 lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
iiif_manifest-1.3.1 lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
iiif_manifest-1.3.0 lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
iiif_manifest-1.2.0 lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
iiif_manifest-1.1.1 lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
iiif_manifest-1.1.0 lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
iiif_manifest-0.4.0 lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb
iiif_manifest-0.3.0 lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb