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::ESCAPE_REGEX

Class Attribute Summary collapse

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

yn

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_answerBoolean

If true, always return the default answer without prompting

Returns:

  • (Boolean)

    default answer



36
37
38
# File 'lib/doing/prompt/prompt.rb', line 36

def default_answer
  @default_answer ||= false
end

.force_answerObject

Value to return if prompt is skipped

Returns:

  • Force answer value



27
28
29
# File 'lib/doing/prompt/prompt.rb', line 27

def force_answer
  @force_answer ||= nil
end