Class: Sunspot::Query::Sort::FunctionSort
- Defined in:
- lib/sunspot/query/sort.rb
Overview
A FunctionSort sorts by solr function. FunctionComp recursively parses arguments for nesting
Instance Attribute Summary collapse
-
#comp ⇒ Object
readonly
Returns the value of attribute comp.
Instance Method Summary collapse
-
#initialize(setup, args) ⇒ FunctionSort
constructor
A new instance of FunctionSort.
- #to_param ⇒ Object
Constructor Details
#initialize(setup, args) ⇒ FunctionSort
Returns a new instance of FunctionSort.
124 125 126 127 |
# File 'lib/sunspot/query/sort.rb', line 124 def initialize(setup,args) @direction = args.pop @comp = FunctionComp.new(setup,args) end |
Instance Attribute Details
#comp ⇒ Object (readonly)
Returns the value of attribute comp.
123 124 125 |
# File 'lib/sunspot/query/sort.rb', line 123 def comp @comp end |
Instance Method Details
#to_param ⇒ Object
128 129 130 |
# File 'lib/sunspot/query/sort.rb', line 128 def to_param "#{comp.to_s} #{direction_for_solr}" end |