serial_preference 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
|