ask_filtered(statement, color, options)protected
No documentation available.
# File lib/bundler/vendor/thor/lib/thor/shell/basic.rb, line 424
def ask_filtered(statement, color, options)
answer_set = options[:limited_to]
correct_answer = nil
until correct_answer
answers = answer_set.join(", ")
answer = ask_simply("#{statement} [#{answers}]", color, options)
correct_answer = answer_set.include?(answer) ? answer : nil
say("Your response must be one of: [#{answers}]. Please try again.") unless correct_answer
end
correct_answer
end