Class: Shutterbug::CacheManager::CacheEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/shutterbug/cache_manager/cache_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(storage) ⇒ CacheEntry

Returns a new instance of CacheEntry.



8
9
10
11
12
# File 'lib/shutterbug/cache_manager/cache_entry.rb', line 8

def initialize(storage)
  @key = storage.filename
  @url = storage.url
  @preview_url = storage.url
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



4
5
6
# File 'lib/shutterbug/cache_manager/cache_entry.rb', line 4

def key
  @key
end

#preview_urlObject

Returns the value of attribute preview_url.



6
7
8
# File 'lib/shutterbug/cache_manager/cache_entry.rb', line 6

def preview_url
  @preview_url
end

#urlObject

Returns the value of attribute url.



5
6
7
# File 'lib/shutterbug/cache_manager/cache_entry.rb', line 5

def url
  @url
end

Instance Method Details

#image_tagObject



14
15
16
# File 'lib/shutterbug/cache_manager/cache_entry.rb', line 14

def image_tag
  "<img src='#{self.preview_url}' alt='#{self.preview_url}'>"
end