Class: Binary
Class Method Summary collapse
Class Method Details
.from_mongo(value) ⇒ Object
21 22 23 |
# File 'lib/mongo_mapper/support.rb', line 21 def self.from_mongo(value) value end |
.to_mongo(value) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/mongo_mapper/support.rb', line 13 def self.to_mongo(value) if value.is_a?(ByteBuffer) value else value.nil? ? nil : ByteBuffer.new(value) end end |