lib/id/coercion.rb in id-0.1 vs lib/id/coercion.rb in id-0.1.1
- old
+ new
@@ -34,5 +34,8 @@
Id::Coercion.register String, Integer, &:to_i
Id::Coercion.register String, Float, &:to_f
Id::Coercion.register String, Date, &Date.method(:parse)
Id::Coercion.register String, Time, &Time.method(:parse)
Id::Coercion.register String, Id::Boolean, &Id::Boolean.method(:parse)
+Id::Coercion.register Fixnum, Id::Boolean, &Id::Boolean.method(:parse)
+Id::Coercion.register TrueClass, Id::Boolean, &Id::Boolean.method(:parse)
+Id::Coercion.register FalseClass, Id::Boolean, &Id::Boolean.method(:parse)