Sha256: c75a8d31aea847fcb98988ad7c079fd97495dcfabdf3713fe83f3981b5df251f
Contents?: true
Size: 327 Bytes
Versions: 8
Compression:
Stored size: 327 Bytes
Contents
# frozen_string_literal: true module Split class DashboardPaginator def initialize(collection, page_number, per) @collection = collection @page_number = page_number @per = per end def paginate to = @page_number * @per from = to - @per @collection[from...to] end end end
Version data entries
8 entries across 8 versions & 2 rubygems