class

Term::Prompt::MultiList

Inherits Term::Prompt::List / Reference / Object

A class responsible for rendering multi select list menu. Used by {Prompt} to display interactive choice menu.

Constants

HELP = "(Use %s arrow%s keys, press Space to select and Enter to finish%s)"

Constructors

new(prompt, **options)

Create instance of TTY::Prompt::MultiList menu.

Source

Instance methods

answer

All values for the choices selected

Source
call(question, possibilities, &block : MultiList -> )
Source
default=(values : Array(Int32))
Source
keyenter
Source
keyreturn

Callback fired when enter/return key is pressed

Source
keyspace

Callback fired when space key is pressed

Source
max=(max : Int32 | Nil)
Source
min=(min : Int32 | Nil)
Source
minmax_help

Header part showing the minimum/maximum number of choices

@return [String]

@api private

Source
render_header

Render initial help text and then currently selected choices

Source
render_menu

Render menu with choices to select from

Source
selected_names

Generate selected items names

Source
setup_defaults

Setup default options and active selection

Source