Class: Mongoid::Boolean

Inherits:
Object
  • Object
show all
Defined in:
build/mongoid-7.0/lib/mongoid/extensions/boolean.rb

Class Method Summary collapse

Class Method Details

.mongoize(object) ⇒ String Also known as: evolve

Turn the object from the ruby type we deal with to a Mongo friendly type.

Examples:

Mongoize the object.

Boolean.mongoize("123.11")

Returns:

  • (String)

    The object mongoized.

Since:

  • 3.0.0



16
17
18
# File 'build/mongoid-7.0/lib/mongoid/extensions/boolean.rb', line 16

def mongoize(object)
  ::Boolean.evolve(object)
end