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