lib/code_kindly/utils/boolean.rb in codekindly-utils-0.0.1 vs lib/code_kindly/utils/boolean.rb in codekindly-utils-0.0.2
- old
+ new
@@ -1,10 +1,10 @@
module CodeKindly
module Utils
class Boolean
# modified from ActiveRecord::ConnectionAdapters::Column (4.2.9)
- TRUE_VALUES = [true, 1, '1', 't', 'T', 'true', 'TRUE', 'on', 'ON', 'y', 'yes']
- FALSE_VALUES = [false, 0, '0', 'f', 'F', 'false', 'FALSE', 'off', 'OFF', 'n', 'no']
+ TRUE_VALUES = [true, 1, "1", "t", "T", "true", "TRUE", "on", "ON", "y", "yes"]
+ FALSE_VALUES = [false, 0, "0", "f", "F", "false", "FALSE", "off", "OFF", "n", "no"]
class << self
def from (value)
return true if is_true?(value)
return false if is_false?(value)