Module: Veritas::Optimizer::Function::Unary::UnoptimizedOperand

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 operand is unoptimized

Returns:

  • (Boolean)


69
70
71
# File 'lib/veritas/optimizer/function/unary.rb', line 69

def optimizable?
  ! operand.equal?(operation.operand)
end

#optimizeAggregate

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 Aggregate with an optimized operand

Returns:



78
79
80
# File 'lib/veritas/optimizer/function/unary.rb', line 78

def optimize
  operation.class.new(operand)
end