Module: Mongoid::Extensions::FalseClass::Equality

Included in:
FalseClass
Defined in:
lib/mongoid/extensions/false_class/equality.rb

Overview

Adds equality hooks for false values.

Instance Method Summary collapse

Instance Method Details

#is_a?(other) ⇒ true, false

Is the passed value a boolean?

Examples:

Is the value a boolean type?

false.is_a?(Boolean)

Parameters:

  • other (Class)

    The class to check.

Returns:

  • (true, false)

    If the other is a boolean.

Since:

  • 1.0.0



19
20
21
22
# File 'lib/mongoid/extensions/false_class/equality.rb', line 19

def is_a?(other)
  return true if other.name == "Boolean"
  super(other)
end