123456789_123456789_123456789_123456789_123456789_

Module: Mongoid::Extensions::Binary

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/mongoid/extensions/binary.rb

Overview

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

Instance Method Summary

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:

[ GitHub ]

  
# File 'lib/mongoid/extensions/binary.rb', line 17

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