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
-
#optimizable? ⇒ Boolean
private
Test if the operands are unoptimized.
-
#optimize ⇒ Binary
private
Return a Binary connective with optimized operands.
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 |
#optimize ⇒ Binary
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 |