Module: Imgproxy::OptionsCasters::Bool
- Defined in:
- lib/imgproxy/options_casters/bool.rb
Overview
Casts boolean option
Class Method Summary collapse
Class Method Details
.cast(raw) ⇒ Object
7 8 9 10 11 |
# File 'lib/imgproxy/options_casters/bool.rb', line 7 def self.cast(raw) return if raw.nil? (raw && raw != 0 && raw != "0") ? 1 : 0 end |