module Mongoid::Criteria::Queryable::Extensions::Regexp::ClassMethods

Public Instance Methods

evolve(object) click to toggle source

Evolve the object into a regex.

@example Evolve the object to a regex.

Regexp.evolve("\A[123]")

@param [ Regexp | String ] object The object to evolve.

@return [ Regexp ] The evolved regex.

# File lib/mongoid/criteria/queryable/extensions/regexp.rb, line 32
def evolve(object)
  __evolve__(object) do |obj|
    mongoize(obj)
  end
end