Sha256: d1e9ec823949564d1880f0548385a05da3c2c79f66d01c5f7b874f22029230ce

Contents?: true

Size: 394 Bytes

Versions: 4

Compression:

Stored size: 394 Bytes

Contents

class QuestionWithEagerFullExplanation < SimpleDelegator
  def ask_and_wait_for_valid_response(&block)
    loop do
      @reask = false
      puts "#{question} #{options.shortcuts_string}"
      puts options.shortcuts_meanings
      resp = Interactive::Response(options)

      yield resp
      break if !resp.invalid? && @reask == false
    end
  end

  def reask!
    @reask = true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
interactive-0.6.2 lib/interactive/question_with_eager_full_explanation.rb
interactive-0.6.1 lib/interactive/question_with_eager_full_explanation.rb
interactive-0.6.0 lib/interactive/question_with_eager_full_explanation.rb
interactive-0.5.0 lib/interactive/question_with_eager_full_explanation.rb