Class: IIIFManifest::ManifestBuilder::ImageServiceBuilder
- Inherits:
-
Object
- Object
- IIIFManifest::ManifestBuilder::ImageServiceBuilder
- Defined in:
- lib/iiif_manifest/manifest_builder/image_service_builder.rb
Instance Attribute Summary collapse
-
#iiif_endpoint ⇒ Object
readonly
Returns the value of attribute iiif_endpoint.
-
#iiif_service_factory ⇒ Object
readonly
Returns the value of attribute iiif_service_factory.
Instance Method Summary collapse
- #apply(resource) ⇒ Object
-
#initialize(iiif_endpoint, iiif_service_factory:) ⇒ ImageServiceBuilder
constructor
A new instance of ImageServiceBuilder.
Constructor Details
#initialize(iiif_endpoint, iiif_service_factory:) ⇒ ImageServiceBuilder
Returns a new instance of ImageServiceBuilder.
5 6 7 8 |
# File 'lib/iiif_manifest/manifest_builder/image_service_builder.rb', line 5 def initialize(iiif_endpoint, iiif_service_factory:) @iiif_endpoint = iiif_endpoint @iiif_service_factory = iiif_service_factory end |
Instance Attribute Details
#iiif_endpoint ⇒ Object (readonly)
Returns the value of attribute iiif_endpoint.
4 5 6 |
# File 'lib/iiif_manifest/manifest_builder/image_service_builder.rb', line 4 def iiif_endpoint @iiif_endpoint end |
#iiif_service_factory ⇒ Object (readonly)
Returns the value of attribute iiif_service_factory.
4 5 6 |
# File 'lib/iiif_manifest/manifest_builder/image_service_builder.rb', line 4 def iiif_service_factory @iiif_service_factory end |
Instance Method Details
#apply(resource) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/iiif_manifest/manifest_builder/image_service_builder.rb', line 10 def apply(resource) service['@context'] = iiif_endpoint.context service['@id'] = iiif_endpoint.url service['profile'] = iiif_endpoint.profile resource.service = service end |