Module: BSON::String::ClassMethods

Defined in:
lib/bson/string.rb

Overview

Since:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#from_bson(buffer, **options) ⇒ Regexp

Deserialize a string from BSON.

Parameters:

  • buffer (ByteBuffer)

    The byte buffer.

  • options (Hash)

    a customizable set of options

Options Hash (**options):

  • :mode (nil | :bson)

    Decoding mode to use.

Returns:

  • (Regexp)

    The decoded string.

See Also:

Since:

  • 2.0.0



112
113
114
# File 'lib/bson/string.rb', line 112

def from_bson(buffer, **options)
  buffer.get_string
end