Methods

BSON::Symbol::ClassMethods

Public Instance Methods

from_bson(bson) click to toggle source

Deserialize a symbol from BSON.

@param [ BSON ] bson The bson representing a symbol.

@return [ Regexp ] The decoded symbol.

@see bsonspec.org/#/specification

@since 2.0.0

# File lib/bson/symbol.rb, line 71
def from_bson(bson)
  bson.read(Int32.from_bson(bson)).from_bson_string.chop!.intern
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.