Module: Imgproxy::OptionsCasters::WebpOptions

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

Overview

Casts ‘webp_options` processing option

Constant Summary collapse

CASTER =
Imgproxy::OptionsCasters::Group.new(
  compression: Imgproxy::OptionsCasters::String,
).freeze

Class Method Summary collapse

Class Method Details

.cast(raw) ⇒ Object



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

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

  values = CASTER.cast(raw)
  values.empty? ? nil : values
end