class RSolr::Response::PaginatedDocSet

def next_page

returns the next page number or the last
def next_page
  @next_page ||= (current_page == total_pages) ? total_pages : current_page+1
end