piotrmurach/tty-prompt

View on GitHub
examples/keypress.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require_relative "../lib/tty-prompt"

prompt = TTY::Prompt.new

answer = prompt.keypress("Press any key to continue")

puts "Answer: #{answer.inspect}"