class Camper::PaginationData

Constants

HEADER_TOTAL_COUNT
METAS

Attributes

total_count[RW]

Public Class Methods

new(headers) click to toggle source
# File lib/camper/pagination_data.rb, line 17
def initialize(headers)
  link_header = headers[HEADER_LINK]

  @total_count = headers[HEADER_TOTAL_COUNT].to_i

  extract_links(link_header) if link_header && link_header =~ /(next)/
end

Public Instance Methods

inspect() click to toggle source
# File lib/camper/pagination_data.rb, line 25
def inspect
  "Next URL: #{@next}; Total Count: #{@total_count}"
end

Private Instance Methods