Module: Doing::PromptYN

Included in:
Prompt
Defined in:
lib/doing/prompt/yn.rb

Overview

Request Yes/No answers on command line

Instance Method Summary collapse

Instance Method Details

#yn(question, default_response: false) ⇒ Boolean

Ask a yes or no question in the terminal

Parameters:

  • question (String)

    The question to ask

  • default_response (Boolean) (defaults to: false)

    default response if no input

Returns:

  • (Boolean)

    yes or no