Class: Array
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#from_mongo(value) ⇒ Object
7 8 9 10 |
# File 'lib/mongo_mapper/support.rb', line 7 def from_mongo(value) value || [] end |
#to_mongo(value) ⇒ Object
2 3 4 5 |
# File 'lib/mongo_mapper/support.rb', line 2 def to_mongo(value) value = value.respond_to?(:lines) ? value.lines : value value.to_a end |