class Pagy::Keyset

def records

Retrieve the array of records for the current page
def records
  @records ||= begin
    @set    = apply_select if select?
    @set    = @vars[:after_latest]&.(@set, @latest) || after_latest if @latest
    records = @set.limit(@limit + 1).to_a
    @more   = records.size > @limit && !records.pop.nil?
    records
  end
end