Class: Spotlight::IiifResourceResolver
- Inherits:
-
Object
- Object
- Spotlight::IiifResourceResolver
- Defined in:
- app/services/spotlight/iiif_resource_resolver.rb
Overview
Update an ActiveRecord resource that containes identifiers for all the levels of an image resource described in a IIIF manifest
Defined Under Namespace
Classes: ManifestError
Instance Method Summary collapse
-
#initialize(resource) ⇒ IiifResourceResolver
constructor
A new instance of IiifResourceResolver.
- #resolve! ⇒ Object
Constructor Details
#initialize(resource) ⇒ IiifResourceResolver
Returns a new instance of IiifResourceResolver.
10 11 12 |
# File 'app/services/spotlight/iiif_resource_resolver.rb', line 10 def initialize(resource) @resource = resource end |
Instance Method Details
#resolve! ⇒ Object
14 15 16 17 18 19 |
# File 'app/services/spotlight/iiif_resource_resolver.rb', line 14 def resolve! resource.iiif_tilesource = updated_tilesource return resource.save if resource.changed? Rails.logger.info("#{self.class.name} resolved #{iiif_manifest_url}, but nothing changed.") end |