Class: Spotlight::SolrDocument::UploadedResource::LegacyImagePyramidTileSource
- Inherits:
-
Object
- Object
- Spotlight::SolrDocument::UploadedResource::LegacyImagePyramidTileSource
- Defined in:
- app/models/concerns/spotlight/solr_document/uploaded_resource.rb
Overview
Stub legacy image pyramid property generators
Instance Attribute Summary collapse
-
#to_tilesource ⇒ Object
readonly
Returns the value of attribute to_tilesource.
Instance Method Summary collapse
-
#initialize(url, dimensions = {}) ⇒ LegacyImagePyramidTileSource
constructor
A new instance of LegacyImagePyramidTileSource.
Constructor Details
#initialize(url, dimensions = {}) ⇒ LegacyImagePyramidTileSource
Returns a new instance of LegacyImagePyramidTileSource.
33 34 35 36 37 38 39 40 41 42 |
# File 'app/models/concerns/spotlight/solr_document/uploaded_resource.rb', line 33 def initialize(url, dimensions = {}) @to_tilesource = { type: 'legacy-image-pyramid', levels: [{ url: url, width: dimensions[:width], height: dimensions[:height] }] } end |
Instance Attribute Details
#to_tilesource ⇒ Object (readonly)
Returns the value of attribute to_tilesource.
32 33 34 |
# File 'app/models/concerns/spotlight/solr_document/uploaded_resource.rb', line 32 def to_tilesource @to_tilesource end |