Module: BSON::Float::ClassMethods

Defined in:
lib/bson/float.rb

Overview

Since:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#from_bson(bson) ⇒ Float

Deserialize an instance of a Float from a BSON double.

Parameters:

  • bson (BSON)

    The encoded double.

Returns:

  • (Float)

    The decoded Float.

See Also:

Since:

  • 2.0.0



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

def from_bson(bson)
  from_bson_double(bson.read(8))
end