Parent

Methods

BSON::Boolean

Represents a $maxKey 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(bson) click to toggle source

Deserialize a boolean from BSON.

@param [ BSON ] bson The encoded boolean.

@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(bson)
  bson.readbyte == 1
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.