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

Included in:
Connective::Binary::UnoptimizedOperands, Numeric::UnoptimizedOperands, Predicate::Enumerable::UnoptimizedOperands, Predicate::UnoptimizedOperands, Relation::Operation::Binary::UnoptimizedOperands
Defined in:
lib/veritas/optimizer/function/binary.rb

Overview

Optimize when the operand is unoptimized

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) optimizable?

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

- (Binary) optimize

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