Module: Spark::InternalSorter

Defined in:
lib/spark/sort.rb

Defined Under Namespace

Classes: Ascending, Base, Descending

Class Method Summary collapse

Class Method Details

.get(ascending, key_function) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/spark/sort.rb', line 22

def self.get(ascending, key_function)
  if ascending
    type = Ascending
  else
    type = Descending
  end

  type.new(key_function)
end