Provides behaviour to special values that exist in the BSON spec that don’t have a native type, like $minKey and $maxKey.
@see bsonspec.org/#/specification
@since 2.0.0
Determine if the min key is equal to another object.
@example Check min key equality.
BSON::MinKey.new == object
@param [ Object ] other The object to check against.
@return [ true, false ] If the objects are equal.
@since 2.0.0
# File lib/bson/specialized.rb, line 35 def ==(other) self.class == other.class end
Encode the min key - has no value since it only needs the type and field name when being encoded.
@example Encode the min key value.
min_key.to_bson
@return [ String ] An empty string.
@since 2.0.0
# File lib/bson/specialized.rb, line 48 def to_bson(encoded = ''.force_encoding(BINARY)) encoded end
Generated with the Darkfish Rdoc Generator 2.