Module: Axiom::Optimizer::Function::Predicate::Enumerable::OneRight

Includes:
Axiom::Optimizer::Function::Predicate::Enumerable
Included in:
Axiom::Optimizer::Function::Predicate::Exclusion::OneRight, Inclusion::OneRight
Defined in:
lib/axiom/optimizer/function/predicate/enumerable.rb

Overview

Optimize when the right operand has one entry

Instance Method Summary collapse

Methods included from Axiom::Optimizer::Function::Predicate::Enumerable

sort_by_value

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 right operand has one entry

Returns:

  • (Boolean)


124
125
126
# File 'lib/axiom/optimizer/function/predicate/enumerable.rb', line 124

def optimizable?
  right.one? { true }
end