lib/serial_preference/preference.rb in serial_preference-0.2.0 vs lib/serial_preference/preference.rb in serial_preference-0.2.2

- old
+ new

@@ -36,9 +36,15 @@ when :integer value.to_i when :float, :real value.to_f when :boolean + return false if value == 0 + return false if value == "" + return false if value == nil + return false if value.to_s.downcase == "false" + return false if value == "0" + return false if value.to_s.downcase == "no" !!value else nil end end \ No newline at end of file