Class: Attributary::Types::BooleanType
- Defined in:
- lib/attributary/types/boolean_type.rb
Class Method Summary collapse
Class Method Details
.cast_to(value) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/attributary/types/boolean_type.rb', line 4 def self.cast_to(value) if ['false', 0, '0', false, nil, ''].include?(value) false else true end end |