Class: IIIFManifest::ManifestBuilder::CompositeBuilderFactory

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*factories, composite_builder:) ⇒ CompositeBuilderFactory

Returns a new instance of CompositeBuilderFactory.



5
6
7
8
# File 'lib/iiif_manifest/manifest_builder/composite_builder_factory.rb', line 5

def initialize(*factories, composite_builder:)
  @factories = factories
  @composite_builder = composite_builder
end

Instance Attribute Details

#composite_builderObject (readonly)

Returns the value of attribute composite_builder.



4
5
6
# File 'lib/iiif_manifest/manifest_builder/composite_builder_factory.rb', line 4

def composite_builder
  @composite_builder
end

#factoriesObject (readonly)

Returns the value of attribute factories.



4
5
6
# File 'lib/iiif_manifest/manifest_builder/composite_builder_factory.rb', line 4

def factories
  @factories
end

Instance Method Details

#new(*args) ⇒ Object



10
11
12
13
14
15
# File 'lib/iiif_manifest/manifest_builder/composite_builder_factory.rb', line 10

def new(*args)
  result = factories.map do |factory|
    factory.new(*args)
  end
  composite_builder.new(*result)
end