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

Defined in:
lib/mongoid/criteria/queryable/extensions/regexp.rb

Overview

Adds query type-casting behavior to Regexp class.

Defined Under Namespace

Modules: ClassMethods, Raw_

Instance Method Summary collapse

Instance Method Details

#regexp?true

Is the object a regexp?

Examples:

Is the object a regex?

/\A[123]/.regexp?

Returns:

  • (true)

    Always true.



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

def regexp?; true; end