module Mongoid::Criteria::Queryable::Extensions::Symbol
This module contains additional symbol behavior.
Public Instance Methods
__expr_part__(value, negating = false)
click to toggle source
Get the symbol as a specification.
@example Get the symbol as a criteria.
:field.__expr_part__(value)
@param [ Object
] value The value of the criteria. @param [ true, false ] negating If the selection should be negated.
@return [ Hash
] The selection.
@since 1.0.0
# File lib/mongoid/criteria/queryable/extensions/symbol.rb, line 23 def __expr_part__(value, negating = false) ::String.__expr_part__(self, value, negating) end
to_direction()
click to toggle source
Get the symbol as a sort direction.
@example Get the symbol as a sort direction.
"1".to_direction
@return [ Integer ] The direction.
@since 1.0.0
# File lib/mongoid/criteria/queryable/extensions/symbol.rb, line 35 def to_direction to_s.to_direction end