module WillPaginate::SequelMethods

Sequel already supports pagination; we only need to make the resulting dataset look a bit more like WillPaginate::Collection

Public Instance Methods

length() click to toggle source
Alias for: size
offset() click to toggle source

Current offset of the paginated collection

# File lib/will_paginate/sequel.rb, line 33
def offset
  (current_page - 1) * per_page
end
out_of_bounds?() click to toggle source
# File lib/will_paginate/sequel.rb, line 28
def out_of_bounds?
  current_page > total_pages
end
per_page() click to toggle source
# File lib/will_paginate/sequel.rb, line 15
def per_page
  page_size
end
size() click to toggle source
# File lib/will_paginate/sequel.rb, line 19
def size
  current_page_record_count
end
Also aliased as: length
total_entries() click to toggle source
# File lib/will_paginate/sequel.rb, line 24
def total_entries
  pagination_record_count
end
total_pages() click to toggle source
# File lib/will_paginate/sequel.rb, line 11
def total_pages
  page_count
end