Sha256: 7b2a40c7fa3ddf54d6929054a966ab5d8a8ca48f885d3c6aa34bef796b54afb3

Contents?: true

Size: 200 Bytes

Versions: 7

Compression:

Stored size: 200 Bytes

Contents

# encoding: utf-8

require_relative "../lib/tty-prompt"

prompt = TTY::Prompt.new

answer = prompt.ask('Password?', echo: false) do |q|
  q.validate(/^[^\.]+\.[^\.]+/)
end

puts "Password: #{answer}"

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tty-prompt-0.17.2 examples/echo.rb
tty-prompt-0.17.1 examples/echo.rb
tty-prompt-0.17.0 examples/echo.rb
tty-prompt-0.16.1 examples/echo.rb
tty-prompt-0.16.0 examples/echo.rb
tty-prompt-0.15.0 examples/echo.rb
tty-prompt-0.14.0 examples/echo.rb