class

Paginator::Page(T)

Inherits Paginator::SharedMethods < Reference < Object

Constructors

new(items : Array(T), count : Int64, vars : Hash(Symbol, Array(Symbol) | Bool | Int32 | String | Symbol), current_page : Int32, page : Int32, per_page : Int32, limit : Int32, outset : Int32, offset : Int32, last : Int32)
Source
new(items : Array(T), count : Int64, vars : Hash(Symbol, _))
Source

Class methods

from_search_results(results : Array(T), query : String | Nil, page : Int32, per_page : Int32)

Add a method specifically for search results

Source

Instance methods

count
Source
current_page
Source
has_next
Source
items
Source
last
Source
limit
Source
next
Source
next_page
Source
offset

getter last : Int32

Source
outset
Source
page
Source
per_page

Define getters with explicit types

Source
prev
Source
prev_page
Source
series
Source
total
Source
total_pages

def total_pages : Int32 @last end

Source
vars
Source