Class: Binary
Class Method Summary collapse
Class Method Details
.from_mongo(value) ⇒ Object
27 28 29 |
# File 'lib/mongo_mapper/support.rb', line 27 def self.from_mongo(value) value end |
.to_mongo(value) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/mongo_mapper/support.rb', line 19 def self.to_mongo(value) if value.is_a?(ByteBuffer) value else value.nil? ? nil : ByteBuffer.new(value) end end |