Module: Imgproxy::OptionsCasters::PngOptions
- Defined in:
- lib/imgproxy/options_casters/png_options.rb
Overview
Casts ‘png_options` processing option
Constant Summary collapse
- CASTER =
Imgproxy::OptionsCasters::Group.new( interlaced: Imgproxy::OptionsCasters::Bool, quantize: Imgproxy::OptionsCasters::Bool, quantization_colors: Imgproxy::OptionsCasters::Integer, ).freeze
Class Method Summary collapse
Class Method Details
.cast(raw) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/imgproxy/options_casters/png_options.rb', line 17 def self.cast(raw) return raw unless raw.is_a?(Hash) values = CASTER.cast(raw) values.empty? ? nil : values end |