Module: Veritas::Optimizer::Function::Predicate::Enumerable
- Included in:
- EmptyRightOperand, OneRightOperand, UnoptimizedOperands, Exclusion, Inclusion
- Defined in:
- lib/veritas/optimizer/function/predicate/enumerable.rb
Overview
Abstract base class representing Enumerable predicate optimizations
Defined Under Namespace
Modules: EmptyRightOperand, OneRightOperand Classes: UnoptimizedOperands
Class Method Summary collapse
-
.sort_by_value(object) ⇒ Object
private
Return a value to sort the obejct with.
Class Method Details
.sort_by_value(object) ⇒ Object
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 value to sort the obejct with
18 19 20 21 22 23 24 25 |
# File 'lib/veritas/optimizer/function/predicate/enumerable.rb', line 18 def self.sort_by_value(object) case object when TrueClass then 1 when FalseClass then 0 else object end end |