Class: QuestionWithLazyFullExplanation
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- QuestionWithLazyFullExplanation
- Defined in:
- lib/interactive/question_with_lazy_full_explanation.rb
Instance Method Summary collapse
Instance Method Details
#ask_and_wait_for_valid_response(&block) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/interactive/question_with_lazy_full_explanation.rb', line 2 def ask_and_wait_for_valid_response(&block) loop do puts "#{question} #{.shortcuts_string}" resp = Interactive::Response() puts .shortcuts_meanings if resp.invalid? yield resp break unless resp.invalid? end end |