Class: Dynamoid::TypeCasting::BooleanTypeCaster
- Defined in:
- lib/dynamoid/type_casting.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Dynamoid::TypeCasting::Base
Instance Method Details
#process(value) ⇒ Object
277 278 279 280 281 282 283 284 285 |
# File 'lib/dynamoid/type_casting.rb', line 277 def process(value) if value == '' nil elsif [false, 'false', 'FALSE', 0, '0', 'f', 'F', 'off', 'OFF'].include? value false else true end end |