Module: Mongoid::Extensions::Binary

Defined in:
build/mongoid-8.1/lib/mongoid/extensions/binary.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#mongoizeBSON::Binary | nil

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

Examples:

Mongoize the object.

object.mongoize

Returns:

  • (BSON::Binary | nil)

    The object.



14
15
16
# File 'build/mongoid-8.1/lib/mongoid/extensions/binary.rb', line 14

def mongoize
  BSON::Binary.mongoize(self)
end