Class: RediSearch::Search::Clauses::Limit
- Inherits:
-
ApplicationClause
- Object
- ApplicationClause
- RediSearch::Search::Clauses::Limit
- Defined in:
- lib/redi_search/search/clauses/limit.rb
Instance Method Summary collapse
- #clause ⇒ Object
-
#initialize(total:, offset: 0) ⇒ Limit
constructor
A new instance of Limit.
Methods inherited from ApplicationClause
#clause_order, clause_order, clause_term
Methods included from Validatable
Constructor Details
#initialize(total:, offset: 0) ⇒ Limit
Returns a new instance of Limit.
15 16 17 18 |
# File 'lib/redi_search/search/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/search/clauses/limit.rb', line 20 def clause validate! ["LIMIT", offset, total] end |