Class: Set

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

Class Method Summary collapse

Class Method Details

.from_mongo(value) ⇒ Object



146
147
148
# File 'lib/mongo_mapper/support.rb', line 146

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

.to_mongo(value) ⇒ Object



142
143
144
# File 'lib/mongo_mapper/support.rb', line 142

def self.to_mongo(value)
  value.to_a
end