class RediSearch::Search::Clauses::Limit

Public Class Methods

new(total:, offset: 0) click to toggle source
# File lib/redi_search/search/clauses/limit.rb, line 16
def initialize(total:, offset: 0)
  @total = total
  @offset = offset
end

Public Instance Methods

clause() click to toggle source
# File lib/redi_search/search/clauses/limit.rb, line 21
def clause
  validate!

  ["LIMIT", offset, total]
end