Class: Image::Transform
- Inherits:
-
BaseFormObject
- Object
- BaseFormObject
- Image::Transform
- Defined in:
- app/forms/image/transform.rb
Overview
Form object for image transformations (resize, crop, rotate, reformat)
submitted by the image editor.
Instance Method Summary collapse
-
#to_crop_data ⇒ Hash{Symbol => Integer}
Crop parameters as a hash, with unset values removed.
Methods inherited from BaseFormObject
#attributes, #initialize, #persisted?
Constructor Details
This class inherits a constructor from BaseFormObject
Instance Method Details
#to_crop_data ⇒ Hash{Symbol => Integer}
Crop parameters as a hash, with unset values removed.
21 22 23 24 25 26 27 28 |
# File 'app/forms/image/transform.rb', line 21 def to_crop_data { x: crop_x, y: crop_y, width: crop_w, height: crop_h }.compact end |