module BSON::String
def to_bson(buffer = ByteBuffer.new)
- Since: - 2.0.0
Other tags:
- See: http://bsonspec.org/#/specification -
Returns:
-
(BSON::ByteBuffer)
- The buffer with the encoded object.
Raises:
-
(EncodingError)
- If the string is not UTF-8.
Other tags:
- Example: Get the string as encoded BSON. -
def to_bson(buffer = ByteBuffer.new) buffer.put_string(self) end