Class: Mongoid::Matchable::Regexp
- Defined in:
- lib/mongoid/matchable/regexp.rb
Overview
Defines behavior for handling regular expressions in embedded documents.
Instance Attribute Summary
Attributes inherited from Default
Instance Method Summary collapse
-
#_matches?(regexp) ⇒ true, false
Does the supplied query match the attribute?.
Methods inherited from Default
Constructor Details
This class inherits a constructor from Mongoid::Matchable::Default
Instance Method Details
#_matches?(regexp) ⇒ true, false
Does the supplied query match the attribute?
21 22 23 24 25 26 27 |
# File 'lib/mongoid/matchable/regexp.rb', line 21 def _matches?(regexp) if native_regexp = regexp.try(:compile) super(native_regexp) else super end end |