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