Class: Veritas::Optimizer::Function::Connective::Binary::EqualOperands
- Inherits:
-
Veritas::Optimizer::Function::Connective::Binary
- Object
- Veritas::Optimizer
- Veritas::Optimizer::Function::Connective::Binary
- Veritas::Optimizer::Function::Connective::Binary::EqualOperands
- Defined in:
- lib/veritas/optimizer/function/connective/binary.rb
Overview
Optimize when the operands are equal
Constant Summary
Constants inherited from Veritas::Optimizer
Instance Attribute Summary
Attributes included from Binary
Attributes inherited from Veritas::Optimizer
Instance Method Summary collapse
-
#optimizable? ⇒ Boolean
private
Test if the operands are equal.
-
#optimize ⇒ Function
private
A Binary connective with equal operands is equivalent to the left.
Methods included from Binary
Methods inherited from Veritas::Optimizer
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 equal
182 183 184 |
# File 'lib/veritas/optimizer/function/connective/binary.rb', line 182 def optimizable? left.eql?(right) end |
#optimize ⇒ Function
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.
A Binary connective with equal operands is equivalent to the left
191 192 193 |
# File 'lib/veritas/optimizer/function/connective/binary.rb', line 191 def optimize left end |