module Imgproxy::OptionsCasters::Resize

Casts resize option

Public Class Methods

cast(raw) click to toggle source
# 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