Module: BSON::Array::ClassMethods
- Defined in:
- lib/bson/array.rb
Overview
Instance Method Summary collapse
-
#from_bson(buffer) ⇒ Array
Deserialize the array from BSON.
Instance Method Details
#from_bson(buffer) ⇒ Array
Deserialize the array from BSON.
95 96 97 98 99 100 101 102 103 |
# File 'lib/bson/array.rb', line 95 def from_bson(buffer) array = new buffer.get_int32 # throw away the length while (type = buffer.get_byte) != NULL_BYTE buffer.get_cstring array << BSON::Registry.get(type).from_bson(buffer) end array end |