Sha256: 93f4070f63d9e67c5af9eabbddea48f0d54fd744b1a1d50e611d17908308b75d

Contents?: true

Size: 335 Bytes

Versions: 2

Compression:

Stored size: 335 Bytes

Contents

class QuestionWithLazyFullExplanation < SimpleDelegator
  def ask_and_wait_for_valid_response(&block)
    loop do
      puts "#{question} #{options.shortcuts_string}"
      resp = Interactive::Response(options)
      puts options.shortcuts_meanings if resp.invalid?

      yield resp
      break unless resp.invalid?
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
interactive-0.4.0 lib/interactive/question_with_lazy_full_explanation.rb
interactive-0.3.0 lib/interactive/question_with_lazy_full_explanation.rb