Module: TruthyBooleanOperators

Included in:
NullClass
Defined in:
lib/null.rb

Overview

Define boolean operators based on truthiness.

Instance Method Summary collapse

Instance Method Details

#&(obj) ⇒ Object



121
# File 'lib/null.rb', line 121

def &(obj) truthy? & obj end

#^(obj) ⇒ Object



123
# File 'lib/null.rb', line 123

def ^(obj) truthy? ^ obj end

#|(obj) ⇒ Object



122
# File 'lib/null.rb', line 122

def |(obj) truthy? | obj end