# File lib/capistrano/harrow/ui/tty.rb, line 24 def prompt(prompt_str, answers=['yes', 'no']) answers = Array(answers) @out.write prompt_str default_answer = answers.first hints = answers_hint(answers) unless hints.empty? @out.write " " @out.write hints end @out.write ": " unless IO.select([@in], [], [], @timeout) raise TimeoutError.new else answer = @in.gets.chop end return default_answer if answer.empty? answer end