class Term::Prompt::Paginator
- Term::Prompt::Paginator
- Reference
- Object
Direct Known Subclasses
Defined in:
prompt/paginator.crConstant Summary
-
DEFAULT_PAGE_SIZE =
6
Constructors
-
.new(**options)
Create a Paginator
Instance Method Summary
-
#check_page_size!
Check if page size is valid
-
#current_index : Int32
The 0-based index of the active item on this page
-
#end_index : Int32 | Nil
The 0-based index of the last item on this page
-
#last_index : Int32
The 0-based index of the previously active item on this page
-
#paginate(list, active, page_size = nil, &block : Choice, Int32 -> )
Paginate collection given an active index
-
#paginate(list, active, page_size = nil)
Paginate collection given an active index
-
#reset!
Reset current page indexes
-
#start_index : Int32 | Nil
The 0-based index of the first item on this page
-
#start_index=(start_index : Int32 | Nil)
The 0-based index of the first item on this page
Constructor Detail
Instance Method Detail
Paginate collection given an active index