Module: BSON::Float::ClassMethods

Defined in:
lib/bson/float.rb

Overview

Since:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#from_bson(buffer) ⇒ Float

Deserialize an instance of a Float from a BSON double.

Parameters:

  • buffer (ByteBuffer)

    The byte buffer.

Returns:

  • (Float)

    The decoded Float.

See Also:

Since:

  • 2.0.0



60
61
62
# File 'lib/bson/float.rb', line 60

def from_bson(buffer)
  buffer.get_double
end