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