Sha256: bcc584863bd6a34e10ca7fe715fcf8ced8f2004097d753f79d41d0410d14baff

Contents?: true

Size: 282 Bytes

Versions: 54

Compression:

Stored size: 282 Bytes

Contents

#!/usr/bin/env ruby

require "rubygems"
require "highline/import"

choices = "ynaq"
answer = ask("Your choice [#{choices}]? ") do |q|
           q.echo      = false
           q.character = true
           q.validate  = /\A[#{choices}]\Z/
         end
say("Your choice: #{answer}")

Version data entries

54 entries across 53 versions & 10 rubygems

Version Path
brakeman-4.3.1 bundle/ruby/2.5.0/gems/highline-1.7.10/examples/get_character.rb
brakeman-4.3.0 bundle/ruby/2.5.0/gems/highline-1.7.10/examples/get_character.rb
brakeman-4.2.1 bundle/ruby/2.5.0/gems/highline-1.7.10/examples/get_character.rb
brakeman-4.2.0 bundle/ruby/2.3.0/gems/highline-1.7.10/examples/get_character.rb
brakeman-4.1.1 bundle/ruby/2.3.0/gems/highline-1.7.10/examples/get_character.rb
brakeman-4.1.0 bundle/ruby/2.3.0/gems/highline-1.7.10/examples/get_character.rb
highline-1.7.10 examples/get_character.rb
brakeman-4.0.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-4.0.1.pre1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-4.0.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-3.7.2 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-3.7.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-3.7.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-3.6.2 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-3.6.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-3.6.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-3.5.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-3.4.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-3.4.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb
brakeman-3.3.5 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/get_character.rb