Class: Spotlight::SolrDocument::UploadedResource::LegacyImagePyramidTileSource
- Inherits:
-
Object
- Object
- Spotlight::SolrDocument::UploadedResource::LegacyImagePyramidTileSource
- Defined in:
- app/models/concerns/spotlight/solr_document/uploaded_resource.rb
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.
14 15 16 17 18 19 20 21 22 23 |
# File 'app/models/concerns/spotlight/solr_document/uploaded_resource.rb', line 14 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.
13 14 15 |
# File 'app/models/concerns/spotlight/solr_document/uploaded_resource.rb', line 13 def to_tilesource @to_tilesource end |