123456789_123456789_123456789_123456789_123456789_

Module: Mongoid::Extensions::Set

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

Overview

Adds type-casting behavior to Set class.

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#resizable?true (readonly)

Returns whether the object’s size can be changed.

Examples:

Is the object resizable?

object.resizable?

Returns:

  • (true)

    true.

[ GitHub ]

  
# File 'lib/mongoid/extensions/set.rb', line 26

def resizable?
  true
end

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.

[ GitHub ]

  
# File 'lib/mongoid/extensions/set.rb', line 16

def mongoize
  ::Set.mongoize(self)
end