Sha256: d7d99c9fa598947bae911d716307ccdebe669311f8476c361377e47ffd2a728c
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
require_relative 'logical_gate' class TrueClass def not LogicalGate.not self end def or(b, *others) LogicalGate.or self, b, others end def nor(b, *others) LogicalGate.nor self, b, others end def and(b, *others) LogicalGate.and self, b, others end def nand(b, *others) LogicalGate.nand self, b, others end def xor(b, *others) LogicalGate.xor self, b, others end def xnor(b, *others) LogicalGate.xnor self, b, others end end class FalseClass def not LogicalGate.not self end def or(b, *others) LogicalGate.or self, b, others end def nor(b, *others) LogicalGate.nor self, b, others end def and(b, *others) LogicalGate.and self, b, others end def nand(b, *others) LogicalGate.nand self, b, others end def xor(b, *others) LogicalGate.xor self, b, others end def xnor(b, *others) LogicalGate.xnor self, b, others end end class Integer def not LogicalGate.not self end def or(b, *others) LogicalGate.or self, b, others end def and(b, *others) LogicalGate.and self, b, others end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ada_truthy-1.0.0 | lib/logical_gates/logical_gate_extension.rb |