module Mongoid::Extensions::Binary

Adds type-casting behavior to BSON::Binary class.

Public Instance Methods

mongoize() click to toggle source

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

@example Mongoize the object.

object.mongoize

@return [ BSON::Binary | nil ] The object.

# File lib/mongoid/extensions/binary.rb, line 17
def mongoize
  BSON::Binary.mongoize(self)
end