class

Term::Prompt::Question

Inherits Term::Prompt::Question::Validators / Reference / Object

A class responsible for gathering user input

Constructors

new(prompt : Term::Prompt, **options)
Source

Instance methods

call(message : Nil | String = "", &block : self -> )

Call the question.

Source
call(message = "")

ditto

Source
convert_result(value)
Source
default
Source
default?
Source
echo
Source
echo=(echo : Bool)
Source
echo?
Source
errors
Source
inspect

Returns an unambiguous and information-rich string representation of this object, typically intended for developers.

This method should usually not be overridden. It delegates to #inspect(IO) which can be overridden for custom implementations.

Also see #to_s.

Source
palette
Source
palette=(palette : Palette)
Source
prefix
Source
prefix=(prefix : String)
Source
process_input(question)

Decide how to handle input from user

Source
question
Source
read_input(question)
Source
refresh(lines, lines_to_clear)

Determine area of the screen to clear

Source
render

Read answer and convert to type

Source
render_error(errors)
Source
render_warning(warnings)
Source
to_s(io)
Source
validators
Source
value
Source
warnings
Source

Nested types