Class: MongoModel::Types::Array

Inherits:
Object
  • Object
show all
Defined in:
lib/mongomodel/support/types/array.rb

Direct Known Subclasses

Set

Instance Method Summary (collapse)

Methods inherited from Object

#boolean, #cast, #from_mongo

Instance Method Details

- (Object) to_mongo(array)



4
5
6
# File 'lib/mongomodel/support/types/array.rb', line 4

def to_mongo(array)
  array.map { |i| convert(i) } if array
end

- (Object) to_query(value)



8
9
10
# File 'lib/mongomodel/support/types/array.rb', line 8

def to_query(value)
  convert(value)
end