Class: FalseClass

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/extensions/boolean.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



38
39
40
41
42
# File 'lib/extensions/boolean.rb', line 38

def <=>(other)
  return -1 if other.instance_of?(TrueClass)
  return 0 if other.instance_of?(FalseClass)
  fail ArgumentError, "comparison of Boolean with #{other.class} failed"
end

#==(other) ⇒ Object



44
45
46
# File 'lib/extensions/boolean.rb', line 44

def ==(other)
  other.instance_of?(FalseClass)
end

#(_other) ⇒ Object



30
31
32
# File 'lib/extensions/boolean.rb', line 30

def 

#(other) ⇒ Object



34
35
36
# File 'lib/extensions/boolean.rb', line 34

def