module BSON::Symbol::ClassMethods

def from_bson(buffer, **options)

Other tags:
    Since: - 2.0.0

Other tags:
    See: http://bsonspec.org/#/specification -

Returns:
  • (Symbol | BSON::Symbol::Raw) - The decoded symbol.

Options Hash: (**options)
  • :mode (nil | :bson) -- Decoding mode to use.

Parameters:
  • buffer (ByteBuffer) -- The byte buffer.
def from_bson(buffer, **options)
  sym = buffer.get_string.intern
  if options[:mode] == :bson
    Raw.new(sym)
  else
    sym
  end
end