Module: BSON::Symbol::ClassMethods

Defined in:
lib/bson/symbol.rb

Overview

Since:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#from_bson(buffer) ⇒ Regexp

Deserialize a symbol from BSON.

Parameters:

  • buffer (ByteBuffer)

    The byte buffer.

Returns:

  • (Regexp)

    The decoded symbol.

See Also:

Since:

  • 2.0.0


100
101
102
# File 'lib/bson/symbol.rb', line 100

def from_bson(buffer)
  buffer.get_string.intern
end