Module: ContentfulModel::AssetDimensions
- Included in:
- Asset
- Defined in:
- lib/contentful_model/asset_dimensions.rb
Overview
Module to extend Asset with Image API capabilities
Instance Method Summary collapse
- #format(fm) ⇒ Object
- #height(h) ⇒ Object
- #jpeg_quality(q) ⇒ Object
- #load ⇒ Object
- #padded_background_color(bg) ⇒ Object
- #png_8bit ⇒ Object
- #query ⇒ Object
- #resize(width = nil, height = nil) ⇒ Object
- #resize_behavior(fit) ⇒ Object
- #rounded_corners(r) ⇒ Object
- #thumbnail_focused_on(f) ⇒ Object
- #width(w) ⇒ Object
Instance Method Details
#format(fm) ⇒ Object
22 23 24 |
# File 'lib/contentful_model/asset_dimensions.rb', line 22 def format(fm) query.format(fm) end |
#height(h) ⇒ Object
18 19 20 |
# File 'lib/contentful_model/asset_dimensions.rb', line 18 def height(h) query.height(h) end |
#jpeg_quality(q) ⇒ Object
26 27 28 |
# File 'lib/contentful_model/asset_dimensions.rb', line 26 def jpeg_quality(q) query.jpeg_quality(q) end |
#load ⇒ Object
50 51 52 |
# File 'lib/contentful_model/asset_dimensions.rb', line 50 def load query.load end |
#padded_background_color(bg) ⇒ Object
46 47 48 |
# File 'lib/contentful_model/asset_dimensions.rb', line 46 def padded_background_color(bg) query.padded_background_color(bg) end |
#png_8bit ⇒ Object
30 31 32 |
# File 'lib/contentful_model/asset_dimensions.rb', line 30 def png_8bit query.png_8bit end |
#query ⇒ Object
6 7 8 |
# File 'lib/contentful_model/asset_dimensions.rb', line 6 def query ContentfulModel::AssetDimensionQuery.new(self) end |
#resize(width = nil, height = nil) ⇒ Object
10 11 12 |
# File 'lib/contentful_model/asset_dimensions.rb', line 10 def resize(width = nil, height = nil) query.resize(width, height) end |
#resize_behavior(fit) ⇒ Object
34 35 36 |
# File 'lib/contentful_model/asset_dimensions.rb', line 34 def resize_behavior(fit) query.resize_behavior(fit) end |
#rounded_corners(r) ⇒ Object
42 43 44 |
# File 'lib/contentful_model/asset_dimensions.rb', line 42 def rounded_corners(r) query.rounded_corners(r) end |
#thumbnail_focused_on(f) ⇒ Object
38 39 40 |
# File 'lib/contentful_model/asset_dimensions.rb', line 38 def thumbnail_focused_on(f) query.thumbnail_focused_on(f) end |
#width(w) ⇒ Object
14 15 16 |
# File 'lib/contentful_model/asset_dimensions.rb', line 14 def width(w) query.width(w) end |