DataMapper::Property::Object
# File lib/dm-core/property/boolean.rb, line 13 def primitive?(value) value == true || value == false end
Typecast a value to a true or false
@param [Integer, to_str] value
value to typecast
@return [Boolean]
true or false constructed from value
@api private
# File lib/dm-core/property/boolean.rb, line 26 def typecast_to_primitive(value) BOOLEAN_MAP.fetch(value, value) end
[Validate]
Generated with the Darkfish Rdoc Generator 2.