Class: Sunspot::Query::Sort::Abstract
- Inherits:
-
Object
- Object
- Sunspot::Query::Sort::Abstract
- Defined in:
- 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
Instance Method Summary collapse
-
#initialize(direction) ⇒ Abstract
constructor
A new instance of Abstract.
Constructor Details
#initialize(direction) ⇒ Abstract
Returns a new instance of Abstract.
39 40 41 |
# File 'lib/sunspot/query/sort.rb', line 39 def initialize(direction) @direction = (direction || :asc).to_sym end |