Module: Veritas::Optimizer::Function::Binary::UnoptimizedOperands

Overview

Optimize when the operand is unoptimized

Instance Method Summary collapse

Instance Method Details

#optimizable?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test if the operands are unoptimized



87
88
89
# File 'lib/veritas/optimizer/function/binary.rb', line 87

def optimizable?
  left_optimizable? || right_optimizable?
end

#optimizeBinary

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return a Binary connective with optimized operands



96
97
98
# File 'lib/veritas/optimizer/function/binary.rb', line 96

def optimize
  operation.class.new(left, right)
end