serial_preference 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -38,6 +38,12 @@ module SerialPreference
|
|
38
38
|
when :float, :real
|
39
39
|
value.to_f
|
40
40
|
when :boolean
|
41
|
+
return false if value == 0
|
42
|
+
return false if value == ""
|
43
|
+
return false if value == nil
|
44
|
+
return false if value.to_s.downcase == "false"
|
45
|
+
return false if value == "0"
|
46
|
+
return false if value.to_s.downcase == "no"
|
41
47
|
!!value
|
42
48
|
else
|
43
49
|
nil
|