Module: Imgproxy::OptionsCasters::Resize
- Defined in:
- lib/imgproxy/options_casters/resize.rb
Overview
Casts resize option
Class Method Summary collapse
Class Method Details
.cast(raw) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/imgproxy/options_casters/resize.rb', line 11 def self.cast(raw) return raw unless raw.is_a?(Hash) [ Imgproxy::OptionsCasters::String.cast(raw[:resizing_type]) || "fit", *Imgproxy::OptionsCasters::Size.cast(raw), ].trim! end |