Class: Shutterbug::CacheManager::CacheEntry
- Inherits:
-
Object
- Object
- Shutterbug::CacheManager::CacheEntry
- Defined in:
- lib/shutterbug/cache_manager/cache_entry.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#preview_url ⇒ Object
Returns the value of attribute preview_url.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #image_tag ⇒ Object
-
#initialize(storage) ⇒ CacheEntry
constructor
A new instance of CacheEntry.
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
#key ⇒ Object
Returns the value of attribute key.
4 5 6 |
# File 'lib/shutterbug/cache_manager/cache_entry.rb', line 4 def key @key end |
#preview_url ⇒ Object
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 |
#url ⇒ Object
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_tag ⇒ Object
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 |