Module: Doing::Prompt
- Extended by:
- Color, PromptChoose, PromptFZF, PromptInput, PromptSTD, PromptYN
- Defined in:
- lib/doing/prompt/prompt.rb
Overview
Terminal Prompt methods
Constant Summary
Constants included from Color
Color::ATTRIBUTES, Color::ATTRIBUTE_NAMES, Color::COLORED_REGEXP, Color::ESCAPE_REGEX
Class Attribute Summary collapse
-
.default_answer ⇒ Boolean
If true, always return the default answer without prompting.
-
.force_answer ⇒ Object
Value to return if prompt is skipped.
Method Summary
Methods included from PromptChoose
choose_from, choose_from_items
Methods included from PromptFZF
fzf, install_fzf, uninstall_fzf, which_fzf
Methods included from PromptYN
Methods included from PromptInput
enter_text, read_line, read_lines, request_lines
Methods included from PromptSTD
clear_screen, restore_std, silence_std
Methods included from Color
attributes, coloring?, rgb, support?, template, uncolor
Class Attribute Details
.default_answer ⇒ Boolean
If true, always return the default answer without prompting
36 37 38 |
# File 'lib/doing/prompt/prompt.rb', line 36 def default_answer @default_answer ||= false end |
.force_answer ⇒ Object
Value to return if prompt is skipped
27 28 29 |
# File 'lib/doing/prompt/prompt.rb', line 27 def force_answer @force_answer ||= nil end |