Sha256: 0444e155d1ed609dc526b0f6cd29cc1c212bf28e9bb02528b6199cb6379db397
Contents?: true
Size: 612 Bytes
Versions: 54
Compression:
Stored size: 612 Bytes
Contents
# encoding: utf-8 module Mongoid module Extensions module Regexp module ClassMethods # Turn the object from the ruby type we deal with to a Mongo friendly # type. # # @example Mongoize the object. # Regexp.mongoize(/^[abc]/) # # @param [ Regexp, String ] object The object to mongoize. # # @return [ Regexp ] The object mongoized. # # @since 3.0.0 def mongoize(object) ::Regexp.new(object) end end end end end ::Regexp.extend(Mongoid::Extensions::Regexp::ClassMethods)
Version data entries
54 entries across 49 versions & 3 rubygems