Sha256: 1fc1ebaafd8561dea362e769d1135c9e3e9441c3213598ca10b3ea57a778076a
Contents?: true
Size: 475 Bytes
Versions: 12
Compression:
Stored size: 475 Bytes
Contents
require 'xommelier' class Boolean BOOLEAN_MAP = { true => true, 'true' => true, 'TRUE' => true, '1' => true, '1.0' => true, 1 => true, 1.0 => true, false => false, 'false' => false, 'FALSE' => false, '0' => false, '0.0' => false, 0 => false, 0.0 => false, nil => false, '' => false } def self.from_xommelier(value) BOOLEAN_MAP[value] end end class TrueClass def to_xommelier self end end class FalseClass def to_xommelier self end end
Version data entries
12 entries across 12 versions & 1 rubygems