Module: BSON::Float
- Defined in:
- lib/bson/float.rb
Overview
Injects behaviour for encoding and decoding floating point values to and from # raw bytes as specified by the BSON spec.
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- BSON_TYPE =
A floating point is type 0x01 in the BSON spec.
1.chr.force_encoding(BINARY).freeze
- PACK =
The pack directive is for 8 byte floating points.
"E".freeze
Instance Method Summary collapse
-
#to_bson(encoded = ''.force_encoding(BINARY)) ⇒ String
Get the floating point as encoded BSON.