123456789_123456789_123456789_123456789_123456789_

Module: Mongoid::Criteria::Queryable::Extensions::Symbol

Relationships & Source Files
Namespace Children
Modules:
Defined in: lib/mongoid/criteria/queryable/extensions/symbol.rb

Overview

Adds query type-casting behavior to Symbol class.

Instance Method Summary

Instance Method Details

#__expr_part__(value, negating = false) ⇒ Hash

Get the symbol as a specification.

Examples:

Get the symbol as a criteria.

:field.__expr_part__(value)

Parameters:

  • value (Object)

    The value of the criteria.

  • negating (true | false) (defaults to: false)

    If the selection should be negated.

Returns:

  • (Hash)

    The selection.

[ GitHub ]

  
# File 'lib/mongoid/criteria/queryable/extensions/symbol.rb', line 21

def __expr_part__(value, negating = false)
  ::String.__expr_part__(self, value, negating)
end