Sha256: e86e27792ed8915d044dcac8ec966d93e624e10fc181bdcd1e2bced8651c91b3
Contents?: true
Size: 276 Bytes
Versions: 38
Compression:
Stored size: 276 Bytes
Contents
class LHS::Pagination::Start < LHS::Pagination::Base def current_page (offset + limit - 1) / 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 + 1 end end
Version data entries
38 entries across 38 versions & 1 rubygems