Class: Solr::Query::Request::Sorting
- Inherits:
-
Object
- Object
- Solr::Query::Request::Sorting
- Defined in:
- lib/solr/query/request/sorting.rb,
lib/solr/query/request/sorting/field.rb,
lib/solr/query/request/sorting/function.rb
Defined Under Namespace
Classes: Field, Function, None
Constant Summary collapse
- ASC =
:asc
- DESC =
:desc
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
Class Method Summary collapse
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(fields: []) ⇒ Sorting
constructor
A new instance of Sorting.
Constructor Details
#initialize(fields: []) ⇒ Sorting
Returns a new instance of Sorting.
23 24 25 26 |
# File 'lib/solr/query/request/sorting.rb', line 23 def initialize(fields: []) @fields = fields freeze end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
17 18 19 |
# File 'lib/solr/query/request/sorting.rb', line 17 def fields @fields end |
Class Method Details
Instance Method Details
#empty? ⇒ Boolean
28 29 30 |
# File 'lib/solr/query/request/sorting.rb', line 28 def empty? fields.empty? end |