class Axiom::Optimizer::Function::Connective::Binary::RedundantLeft
Optimize when the left operand is redundant
Public Instance Methods
optimizable?()
click to toggle source
Test if the left operand is redundant
@return [Boolean]
@api private
# File lib/axiom/optimizer/function/connective/binary.rb, line 199 def optimizable? operation.kind_of?(left.class) && right.eql?(left.right) end
optimize()
click to toggle source
A Binary
connective with a redundant left operand is equivalent to the left
@return [Function]
@api private
# File lib/axiom/optimizer/function/connective/binary.rb, line 208 def optimize left end