Class: QuestionWithEagerFullExplanation
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- QuestionWithEagerFullExplanation
- Defined in:
- lib/interactive/question_with_eager_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 12 |
# File 'lib/interactive/question_with_eager_full_explanation.rb', line 2 def ask_and_wait_for_valid_response(&block) loop do @reask = false puts "#{question} #{.shortcuts_string}" puts .shortcuts_meanings resp = Interactive::Response() yield resp break if !resp.invalid? && @reask == false end end |
#reask! ⇒ Object
14 15 16 |
# File 'lib/interactive/question_with_eager_full_explanation.rb', line 14 def reask! @reask = true end |