Module: Imgproxy::OptionsCasters::Adjust

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

Overview

Casts ‘adjust` processing 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



17
18
19
20
21
# File 'lib/imgproxy/options_casters/adjust.rb', line 17

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

  CASTER.cast(raw)
end