module BSON::OpenStruct
def bson_type
- Since: - 4.2.0
Returns:
-
(String)
- The character 0x03.
Other tags:
- Example: Get the bson type. -
def bson_type ::Hash::BSON_TYPE end
def to_bson(buffer = ByteBuffer.new)
- Since: - 4.2.0
Other tags:
- See: http://bsonspec.org/#/specification -
Returns:
-
(BSON::ByteBuffer)
- The buffer with the encoded object.
Other tags:
- Example: Get the OpenStruct object as encoded BSON. -
def to_bson(buffer = ByteBuffer.new) if Environment.ruby_1_9? marshal_dump.dup else to_h end.to_bson(buffer) end