Module: Imgproxy::OptionsCasters::Adjust

Defined in:
lib/imgproxy/options_casters/adjust.rb

Overview

Casts gravity option

Constant Summary collapse

CASTER =
Imgproxy::OptionsCasters::Group.new(
  brightness: Imgproxy::OptionsCasters::Integer,
  contrast: Imgproxy::OptionsCasters::Float,
  saturation: Imgproxy::OptionsCasters::Float,
).freeze

Class Method Summary collapse

Class Method Details

.cast(raw) ⇒ Object



15
16
17
18
19
# File 'lib/imgproxy/options_casters/adjust.rb', line 15

def self.cast(raw)
  return raw unless raw.is_a?(Hash)

  CASTER.cast(raw)
end