class

Term::Prompt::Paginator

Inherits Reference / Object

Constants

DEFAULT_PAGE_SIZE = 6

Constructors

new

Create a Paginator

Source

Instance methods

check_page_size!

Check if page size is valid

Source
current_index

The 0-based index of the active item on this page

Source
end_index

The 0-based index of the last item on this page

Source
last_index

The 0-based index of the previously active item on this page

Source
paginate(list, active, page_size = nil, &block : Choice, Int32 -> )

Paginate collection given an active index

Source
paginate(list, active, page_size = nil)

Paginate collection given an active index

Source
reset!

Reset current page indexes

Source
start_index

The 0-based index of the first item on this page

Source
start_index=(start_index : Int32 | Nil)

The 0-based index of the first item on this page

Source