Sha256: 9d5502378129e11ceb2c0db8ad8c29eb0a8444769c12e5fa15c5f91d232d3db2

Contents?: true

Size: 286 Bytes

Versions: 5

Compression:

Stored size: 286 Bytes

Contents

# encoding: utf-8

require_relative "../lib/tty-prompt"

prompt = TTY::Prompt.new

warriors = [
  'Scorpion',
  'Kano',
  { name: 'Goro', disabled: '(injury)' },
  'Jax',
  'Kitana',
  'Raiden'
]

answer = prompt.select('Choose your destiny?', warriors, enum: ')')

puts answer.inspect

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tty-prompt-0.17.2 examples/select_disabled.rb
tty-prompt-0.17.1 examples/select_disabled.rb
tty-prompt-0.17.0 examples/select_disabled.rb
tty-prompt-0.16.1 examples/select_disabled.rb
tty-prompt-0.16.0 examples/select_disabled.rb