Sha256: 43eff68d28fc28bb252bbdf181a77e53683884a2f1331957e9a5e3464d08eb9a
Contents?: true
Size: 269 Bytes
Versions: 38
Compression:
Stored size: 269 Bytes
Contents
class LHS::Pagination::Offset < LHS::Pagination::Base def current_page (offset + limit) / limit end def next_offset(step = 1) offset + limit * step end def self.page_to_offset(page, limit = DEFAULT_LIMIT) (page.to_i - 1) * limit.to_i end end
Version data entries
38 entries across 38 versions & 1 rubygems