class BSON::Boolean
Represents a boolean type, which compares less than any other value in the specification.
@see bsonspec.org/#/specification
@since 2.0.0
Constants
- BSON_TYPE
A boolean is type 0x08 in the BSON spec.
@since 2.0.0
Public Class Methods
from_bson(buffer)
click to toggle source
Deserialize a boolean from BSON.
@param [ ByteBuffer ] buffer The byte buffer.
@return [ TrueClass, FalseClass ] The decoded boolean.
@see bsonspec.org/#/specification
@since 2.0.0
# File lib/bson/boolean.rb, line 39 def self.from_bson(buffer) buffer.get_byte == TrueClass::TRUE_BYTE end