Module: BSON::Array::ClassMethods
- Defined in:
- lib/bson/array.rb
Overview
Instance Method Summary collapse
-
#from_bson(bson) ⇒ Array
Deserialize the array from BSON.
Instance Method Details
#from_bson(bson) ⇒ Array
Deserialize the array from BSON.
82 83 84 85 86 87 88 89 90 |
# File 'lib/bson/array.rb', line 82 def from_bson(bson) array = new bson.read(4) # throw away the length while (type = bson.readbyte.chr) != NULL_BYTE bson.gets(NULL_BYTE) array << BSON::Registry.get(type).from_bson(bson) end array end |