Parent

Class/Module Index [+]

Quicksearch

DataMapper::Property::Boolean

Public Instance Methods

primitive?(value) click to toggle source
# File lib/dm-core/property/boolean.rb, line 13
def primitive?(value)
  value == true || value == false
end
typecast_to_primitive(value) click to toggle source

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.