Module: Mongoid::Extensions::Regexp::ClassMethods
- Defined in:
- lib/mongoid/extensions/regexp.rb
Instance Method Summary collapse
-
#mongoize(object) ⇒ Regexp
Turn the object from the ruby type we deal with to a Mongo friendly type.
Instance Method Details
#mongoize(object) ⇒ Regexp
Turn the object from the ruby type we deal with to a Mongo friendly type.
18 19 20 21 |
# File 'lib/mongoid/extensions/regexp.rb', line 18 def mongoize(object) return nil if object.nil? ::Regexp.new(object) end |