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