class BSON::Undefined
Represents the Undefined
BSON
type
@see bsonspec.org/#/specification
@since 2.0.0
Constants
Public Instance Methods
==(other)
click to toggle source
Determine if undefined is equal to another object.
@example Check undefined equality.
BSON::Undefined.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/undefined.rb, line 41 def ==(other) self.class == other.class end
as_extended_json(**options)
click to toggle source
Converts this object to a representation directly serializable to Extended JSON
(github.com/mongodb/specifications/blob/master/source/extended-json.rst).
@option opts [ nil | :relaxed | :legacy ] :mode Serialization mode
(default is canonical extended JSON)
@return [ Hash
] The extended json representation.
# File lib/bson/undefined.rb, line 52 def as_extended_json(**options) { "$undefined" => true } end