Module: Sphinxsearchlogic::Search::Ordering
- Included in:
- Sphinxsearchlogic::Search
- Defined in:
- lib/sphinxsearchlogic.rb
Instance Attribute Summary collapse
-
#order ⇒ Object
Returns the value of attribute order.
-
#order_attribute ⇒ Object
readonly
Returns the value of attribute order_attribute.
-
#order_direction ⇒ Object
readonly
Returns the value of attribute order_direction.
Instance Method Summary collapse
Instance Attribute Details
#order ⇒ Object
Returns the value of attribute order.
95 96 97 |
# File 'lib/sphinxsearchlogic.rb', line 95 def order @order end |
#order_attribute ⇒ Object (readonly)
Returns the value of attribute order_attribute.
95 96 97 |
# File 'lib/sphinxsearchlogic.rb', line 95 def order_attribute @order_attribute end |
#order_direction ⇒ Object (readonly)
Returns the value of attribute order_direction.
95 96 97 |
# File 'lib/sphinxsearchlogic.rb', line 95 def order_direction @order_direction end |
Instance Method Details
#ordering_options ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/sphinxsearchlogic.rb', line 114 def if order_attribute.blank? {} elsif order_attribute.is_a?(Symbol) { :order => order_attribute, :sort_mode => order_direction } else {:order => order_attribute} end end |