module BSON::Symbol
def as_extended_json(**_options)
-
(Hash)
- The extended json representation.
def as_extended_json(**_options) { "$symbol" => to_s } end
def bson_type
- Since: - 4.0.0
Other tags:
- See: http://bsonspec.org/#/specification -
Returns:
-
(String)
- The single byte BSON type.
Other tags:
- Example: Get the BSON type for the symbol. -
def bson_type String::BSON_TYPE end
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.
Other tags:
- Example: Get the symbol as encoded BSON. -
def to_bson(buffer = ByteBuffer.new) buffer.put_symbol(self) end
def to_bson_key
- Since: - 2.0.0
Other tags:
- See: http://bsonspec.org/#/specification -
Returns:
-
(String)
- The encoded symbol as a BSON key.
Other tags:
- Example: Get the symbol as a key name. -
def to_bson_key self end
def to_bson_normalized_key
- Since: - 3.0.0
Returns:
-
(String)
- The symbol as a non interned string.
Other tags:
- Example: Convert the symbol to a normalized key. -
def to_bson_normalized_key to_s end