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