Method: BSON::Int32.from_bson

Defined in:
lib/bson/int32.rb

.from_bson(buffer, **options) ⇒ Integer

Deserialize an Integer 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:

  • (Integer)

    The decoded Integer.

See Also:

Since:

  • 2.0.0



53
54
55
# File 'lib/bson/int32.rb', line 53

def self.from_bson(buffer, **options)
  buffer.get_int32
end