Class: Moped::BSON::Types::CodeWithScope
- Defined in:
- lib/moped/bson/types.rb
Class Method Summary collapse
Class Method Details
.__bson_load__(io) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/moped/bson/types.rb', line 7 def self.__bson_load__(io) io.read 4 # swallow the length code = io.read(*io.read(4).unpack(INT32_PACK)).from_utf8_binary.chop! scope = BSON::Document.deserialize(io) Code.new code, scope end |