Class: BSON::Undefined

Inherits:
Object
  • Object
show all
Includes:
Specialized
Defined in:
lib/bson/undefined.rb

Overview

Represents the Undefined BSON type

See Also:

Since:

  • 2.0.0

Constant Summary collapse

BSON_TYPE =

Undefined is type 0x06 in the BSON spec.

Since:

  • 2.0.0

6.chr.force_encoding(BINARY).freeze

Instance Method Summary collapse

Methods included from Specialized

#to_bson

Instance Method Details

#==(other) ⇒ true, false

Determine if undefined is equal to another object.

Examples:

Check undefined equality.

BSON::Undefined.new == object

Parameters:

  • other (Object)

    The object to check against.

Returns:

  • (true, false)

    If the objects are equal.

Since:

  • 2.0.0


40
41
42
# File 'lib/bson/undefined.rb', line 40

def ==(other)
  self.class == other.class
end