struct Runcobo::Pagination

Overview

A pagination value shared by queries, in-memory lists and response templates. Request parsing and validation remain the caller's responsibility.

Defined in:

runcobo/pagination.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(page : Int | Nil = nil, per_page : Int | Nil = nil, *, default_per_page : Int32 = 20, max_per_page : Int32 = 100) #

[View source]

Instance Method Detail

def offset : Int64 #

[View source]
def page : Int32 #

[View source]
def per_page : Int32 #

[View source]
def slice(items : Array(T)) : Array(T) forall T #

[View source]