lib/mongoid/criteria/queryable/selector.rb
# Evolve a single key selection with various types of values.
#
# @api private
#
# @example Evolve a simple selection.
#   selector.evolve(field, 5)
#
# @param [ Object ] serializer The optional serializer for the field.
# @param [ Object ] value The value to serialize.
#
# @return [ Object ] The serialized object.
Evolve a single key selection with various types of values.
Evolve a single key selection with various types of values .
def evolve(serializer, value)
          case value
          when Hash
            evolve_hash(serializer, value)
          when Array
            evolve_array(serializer, value)
          when Range
            value.__evolve_range__(serializer: serializer)
          else
            (serializer || value.class).evolve(value)
          end
        end
def evolve ( serializer , value ) case value when Hash evolve_hash ( serializer , value ) when Array evolve_array ( serializer , value ) when Range value . __evolve_range__ ( serializer : serializer ) else ( serializer || value . class ) . evolve ( value ) end end
Evolve a single key selection with various types of values.
Evolve a single key selection with various types of values .
The serialized object.
The serialized object .
 Object 
serializer
<not_specific>
value
<not_specific>
<not_specific>
value The value to serialize.
value The value to serialize .
api
None
example
Evolve a simple selection. selector.evolve(field, 5)
Evolve a simple selection . selector . evolve ( field 5 )