Module: BSON::NilClass
- Defined in:
- lib/bson/nil_class.rb
Overview
Injects behaviour for encoding and decoding nil values to and from raw bytes as specified by the BSON spec.
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- BSON_TYPE =
A nil is type 0x0A in the BSON spec.
10.chr.force_encoding(BINARY).freeze
Instance Method Summary collapse
-
#to_bson(encoded = ''.force_encoding(BINARY)) ⇒ String
Get the nil as encoded BSON.