Class: Set

Inherits:
Object show all
Defined in:
lib/mongo_mapper/extensions.rb

Class Method Summary collapse

Class Method Details

.from_mongo(value) ⇒ Object



144
145
146
# File 'lib/mongo_mapper/extensions.rb', line 144

def self.from_mongo(value)
  Set.new(value || [])
end

.to_mongo(value) ⇒ Object



140
141
142
# File 'lib/mongo_mapper/extensions.rb', line 140

def self.to_mongo(value)
  value.to_a
end