Module: Mongoid::Extensions::NilClass

Defined in:
build/mongoid-master/lib/mongoid/extensions/nil_class.rb

Instance Method Summary collapse

Instance Method Details

#__setter__nil

Try to form a setter from this object.

Examples:

Try to form a setter.

object.__setter__

Returns:

  • (nil)

    Always nil.



13
14
15
# File 'build/mongoid-master/lib/mongoid/extensions/nil_class.rb', line 13

def __setter__
  self
end

#collectionizeString

Get the name of a nil collection.

Examples:

Get the nil name.

nil.collectionize

Returns:

  • (String)

    A blank string.



23
24
25
# File 'build/mongoid-master/lib/mongoid/extensions/nil_class.rb', line 23

def collectionize
  to_s.collectionize
end