Class: ActiveadminSelleoCms::Image
- Defined in:
- app/models/activeadmin_selleo_cms/image.rb
Instance Attribute Summary collapse
-
#image_height ⇒ Object
Returns the value of attribute image_height.
-
#image_width ⇒ Object
Returns the value of attribute image_width.
-
#resize_method ⇒ Object
Returns the value of attribute resize_method.
Attributes inherited from Asset
#cover_height, #cover_resize_method, #cover_width, #crop_h, #crop_w, #crop_x, #crop_y
Instance Method Summary collapse
Methods inherited from Asset
Instance Attribute Details
#image_height ⇒ Object
Returns the value of attribute image_height.
3 4 5 |
# File 'app/models/activeadmin_selleo_cms/image.rb', line 3 def image_height @image_height end |
#image_width ⇒ Object
Returns the value of attribute image_width.
3 4 5 |
# File 'app/models/activeadmin_selleo_cms/image.rb', line 3 def image_width @image_width end |
#resize_method ⇒ Object
Returns the value of attribute resize_method.
3 4 5 |
# File 'app/models/activeadmin_selleo_cms/image.rb', line 3 def resize_method @resize_method end |
Instance Method Details
#cropping? ⇒ Boolean
19 20 21 |
# File 'app/models/activeadmin_selleo_cms/image.rb', line 19 def cropping? !crop_x.blank? && !crop_y.blank? && !crop_w.blank? && !crop_h.blank? end |
#image_sizes ⇒ Object
23 24 25 |
# File 'app/models/activeadmin_selleo_cms/image.rb', line 23 def image_sizes { :normal => "#{image_width || 640}x#{image_height || 480}#{resize_method || ">"}" } end |