piotrmurach/tty-prompt

View on GitHub
examples/enum_select_disabled.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require_relative "../lib/tty-prompt"

prompt = TTY::Prompt.new

choices = [
  { name: "Emacs", disabled: "(not installed)" },
  "Atom",
  "GNU nano",
  { name: "Notepad++", disabled: "(not installed)" },
  "Sublime",
  "Vim"
]

prompt.enum_select("Select an editor", choices)