Class: RediSearch::Aggregate::Clauses::Limit
- Inherits:
-
RediSearch::ApplicationClause
- Object
- RediSearch::ApplicationClause
- RediSearch::Aggregate::Clauses::Limit
- Defined in:
- lib/redi_search/aggregate/clauses/limit.rb
Instance Method Summary collapse
- #clause ⇒ Object
-
#initialize(total:, offset: 0) ⇒ Limit
constructor
A new instance of Limit.
Methods inherited from RediSearch::ApplicationClause
#clause_order, clause_order, clause_term
Methods included from Validatable
Constructor Details
#initialize(total:, offset: 0) ⇒ Limit
15 16 17 18 |
# File 'lib/redi_search/aggregate/clauses/limit.rb', line 15 def initialize(total:, offset: 0) @total = total @offset = offset end |
Instance Method Details
#clause ⇒ Object
20 21 22 23 24 |
# File 'lib/redi_search/aggregate/clauses/limit.rb', line 20 def clause validate! ["LIMIT", offset, total] end |