Browse files

Add Boolean#value_loaded? so it works wit the primitive validator

  • Loading branch information...
1 parent 254102b commit b407d57acf4896a797e5dcf067decc111df6b35b @solnic solnic committed Sep 12, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/dm-core/property/boolean.rb
View
6 lib/dm-core/property/boolean.rb
@@ -6,8 +6,14 @@ class Boolean < Object
# @api semipublic
def value_dumped?(value)
+ value_loaded?(value)
+ end
+
+ # @api semipublic
+ def value_loaded?(value)
value == true || value == false
end
+
end # class Boolean
end # class Property
end # module DataMapper

0 comments on commit b407d57

Please sign in to comment.