Class: TrueClass
- Inherits:
-
Object
- Object
- TrueClass
- Includes:
- Comparable
- Defined in:
- lib/extensions/boolean.rb
Instance Method Summary collapse
Instance Method Details
#<=>(other) ⇒ Object
13 14 15 16 17 |
# File 'lib/extensions/boolean.rb', line 13 def <=>(other) return 1 if other.instance_of?(FalseClass) return 0 if other.instance_of?(TrueClass) fail ArgumentError, "comparison of Boolean with #{other.class} failed" end |
#==(other) ⇒ Object
19 20 21 |
# File 'lib/extensions/boolean.rb', line 19 def ==(other) other.instance_of?(TrueClass) end |
#∧(other) ⇒ Object
5 6 7 |
# File 'lib/extensions/boolean.rb', line 5 def |
#∨(_other) ⇒ Object
9 10 11 |
# File 'lib/extensions/boolean.rb', line 9 def |