Class: Sunspot::Query::Sort::Abstract

Inherits:
Object
  • Object
show all
Defined in:
sunspot/lib/sunspot/query/sort.rb

Overview

Base class for sorts. All subclasses should implement the #to_param method, which is a string that is then concatenated with other sort strings by the SortComposite to form the sort parameter.

Direct Known Subclasses

FieldSort, RandomSort, ScoreSort

Instance Method Summary (collapse)

Constructor Details

- (Abstract) initialize(direction)

A new instance of Abstract



39
40
41
# File 'sunspot/lib/sunspot/query/sort.rb', line 39

def initialize(direction)
  @direction = (direction || :asc).to_sym
end