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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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