Module: Gluttonberg::Library::Config::ImageSizes::InstanceMethods
- Defined in:
- lib/gluttonberg/library/config/image_sizes.rb
Overview
ClassMethods
Instance Method Summary collapse
-
#thumb_large_url ⇒ Object
Returns the public URL to the asset’s large thumbnail — relative to the domain.
-
#thumb_small_url ⇒ Object
Returns the public URL to the asset’s small thumbnail — relative to the domain.
-
#url_for(name) ⇒ Object
Returns the URL for the specified image size.
Instance Method Details
#thumb_large_url ⇒ Object
Returns the public URL to the asset’s large thumbnail — relative to the domain.
54 55 56 |
# File 'lib/gluttonberg/library/config/image_sizes.rb', line 54 def thumb_large_url url_for(:large_thumb) if category.downcase == "image" end |
#thumb_small_url ⇒ Object
Returns the public URL to the asset’s small thumbnail — relative to the domain.
48 49 50 |
# File 'lib/gluttonberg/library/config/image_sizes.rb', line 48 def thumb_small_url url_for(:small_thumb) if category.downcase == "image" end |
#url_for(name) ⇒ Object
Returns the URL for the specified image size.
39 40 41 42 43 44 |
# File 'lib/gluttonberg/library/config/image_sizes.rb', line 39 def url_for(name) if self.class.sizes.has_key? name filename = self.class.sizes[name][:filename] "#{asset_directory_public_url}/#{filename}.#{file_extension}" end end |