Class: Regexp

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo_odm/core_ext/conversions.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) type_cast(value)



271
272
273
274
# File 'lib/mongo_odm/core_ext/conversions.rb', line 271

def self.type_cast(value)
  return nil if value.nil?
  new(value)
end

Instance Method Details

- (Object) to_mongo



276
277
278
# File 'lib/mongo_odm/core_ext/conversions.rb', line 276

def to_mongo
  self
end