Class: TrueClass

Inherits:
Object
  • Object
show all
Defined in:
lib/unboolean/core_ext/true_class.rb

Instance Method Summary collapse

Instance Method Details

#&(other) ⇒ Object



5
6
7
# File 'lib/unboolean/core_ext/true_class.rb', line 5

def &(other)
  other.is_a?(Unboolean::Maybe) ? other & self : !!(other)
end

#==(other) ⇒ Object



13
14
15
# File 'lib/unboolean/core_ext/true_class.rb', line 13

def ==(other)
  other.is_a?(Unboolean::Maybe) ? other == self : (!!other).is_a?(TrueClass)
end

#^(other) ⇒ Object



9
10
11
# File 'lib/unboolean/core_ext/true_class.rb', line 9

def ^(other)
  other.is_a?(Unboolean::Maybe) ? other ^ self : (!other).is_a?(TrueClass)
end