123456789_123456789_123456789_123456789_123456789_

Module: Mongoid::Criteria::Queryable::Extensions::Regexp::ClassMethods

Relationships & Source Files
Defined in: lib/mongoid/criteria/queryable/extensions/regexp.rb

Instance Method Summary

Instance Method Details

#evolve(object) ⇒ Regexp

Evolve the object into a regex.

Examples:

Evolve the object to a regex.

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

Parameters:

Returns:

  • (Regexp)

    The evolved regex.

[ GitHub ]

  
# File 'lib/mongoid/criteria/queryable/extensions/regexp.rb', line 32

def evolve(object)
  __evolve__(object) do |obj|
    mongoize(obj)
  end
end