Class: Spotlight::SolrDocument::UploadedResource::LegacyImagePyramidTileSource

Inherits:
Object
  • Object
show all
Defined in:
app/models/concerns/spotlight/solr_document/uploaded_resource.rb

Overview

Stub legacy image pyramid property generators

Instance Attribute Summary collapse

Instance Method Summary collapse

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_tilesourceObject (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