Module: BSON::Array::ClassMethods
- Defined in:
- lib/bson/array.rb
Overview
Class-level methods to be added to the Array class.
Instance Method Summary collapse
-
#from_bson(buffer, **options) ⇒ Array
Deserialize the array from BSON.
Instance Method Details
#from_bson(buffer, **options) ⇒ Array
Note:
If the argument cannot be parsed, an exception will be raised and the argument will be left in an undefined state. The caller must explicitly call rewind on the buffer before trying to parse it again.
Deserialize the array from BSON.
126 127 128 129 130 131 132 |
# File 'lib/bson/array.rb', line 126 def from_bson(buffer, **) if buffer.respond_to?(:get_array) buffer.get_array(**) else parse_array_from_buffer(buffer, **) end end |