Sha256: ed544968cfc097bd6f6c7b6e3ccd84a5b7dfab7cc2de6cfda3c35652a99c3e82

Contents?: true

Size: 335 Bytes

Versions: 1

Compression:

Stored size: 335 Bytes

Contents

# encoding: utf-8

require_relative "../lib/tty-prompt"

prompt = TTY::Prompt.new

drinks = [
  {name: 'sake', disabled: '(out of stock)'},
  'vodka',
  {name: 'beer', disabled: '(out of stock)'},
  'wine',
  'whisky',
  'bourbon'
]
answer = prompt.multi_select('Choose your favourite drink?', drinks, default: 2)

puts answer.inspect

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tty-prompt-0.16.0 examples/multi_select_disabled.rb