Module: Mongoid::Extensions::Set

Defined in:
lib/mongoid/extensions/set.rb

Overview

Adds type-casting behavior to Set class.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#mongoizeArray | nil

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

Examples:

Mongoize the object.

set.mongoize

Returns:

  • (Array | nil)

    The object mongoized or nil.



17
18
19
# File 'lib/mongoid/extensions/set.rb', line 17

def mongoize
  ::Set.mongoize(self)
end