Sha256: 48f3ef1d29e8426c0c78dbaa8295aaf2796d238481eec076a7a23e9db3d453b0

Contents?: true

Size: 339 Bytes

Versions: 1

Compression:

Stored size: 339 Bytes

Contents

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

      yield resp
      break unless resp.invalid?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
interactive-0.2.0 lib/interactive/question_with_lazy_full_explanation.rb