Class: Couchbase::SearchSort::SearchSortId
- Inherits:
-
Couchbase::SearchSort
- Object
- Couchbase::SearchSort
- Couchbase::SearchSort::SearchSortId
- Defined in:
- lib/couchbase/search_options.rb
Instance Attribute Summary collapse
-
#desc ⇒ Boolean
If descending order should be applied.
Instance Method Summary collapse
-
#initialize {|| ... } ⇒ SearchSortId
constructor
A new instance of SearchSortId.
- #to_json(*args) ⇒ Object private
Methods inherited from Couchbase::SearchSort
field, geo_distance, id, score
Constructor Details
#initialize {|| ... } ⇒ SearchSortId
Returns a new instance of SearchSortId.
1153 1154 1155 1156 |
# File 'lib/couchbase/search_options.rb', line 1153 def initialize super yield self if block_given? end |
Instance Attribute Details
#desc ⇒ Boolean
Returns if descending order should be applied.
1150 1151 1152 |
# File 'lib/couchbase/search_options.rb', line 1150 def desc @desc end |
Instance Method Details
#to_json(*args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1159 1160 1161 |
# File 'lib/couchbase/search_options.rb', line 1159 def to_json(*args) {by: :id, desc: desc}.to_json(*args) end |