Sha256: 41866e955077a259fb59bf611c2d6db0a59d256a891dab499f16a41bb6dffa9e
Contents?: true
Size: 549 Bytes
Versions: 11
Compression:
Stored size: 549 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Extensions #:nodoc: module Boolean #:nodoc: module Conversions #:nodoc: BOOLEAN_MAP = { true => true, "true" => true, "TRUE" => true, "1" => true, 1 => true, 1.0 => true, false => false, "false" => false, "FALSE" => false, "0" => false, 0 => false, 0.0 => false } def set(value) value = BOOLEAN_MAP[value] value.nil? ? nil : value end def get(value) value end end end end end
Version data entries
11 entries across 11 versions & 5 rubygems