Class: Moped::BSON::Document
Overview
Represents an entire BSON document.
Class Method Summary collapse
-
.deserialize(io, document = new) ⇒ Document
Deserialize the raw bytes into a BSON document object.
-
.serialize(document, io = "") ⇒ String
Serialize a document into raw bytes.
Methods included from Extensions::Hash::ClassMethods
Methods included from Extensions::Hash
Class Method Details
.deserialize(io, document = new) ⇒ Document
Deserialize the raw bytes into a BSON document object.
20 21 22 |
# File 'lib/moped/bson/document.rb', line 20 def deserialize(io, document = new) __bson_load__(io, document) end |
.serialize(document, io = "") ⇒ String
Serialize a document into raw bytes.
35 36 37 |
# File 'lib/moped/bson/document.rb', line 35 def serialize(document, io = "") document.__bson_dump__(io) end |