-
-
Save Eiam8821/1cda292f5d875f461b99647d19b0b28c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prompt = TTY::Prompt.new | |
menu_choices = [ {name: "A", key:1},{name:"B", key:2},{name: "C", key:3}, {name: "D", key:4}] | |
prompt.select("Pick one:", menu_choices) | |
# You can specify :key as an additional option which will be used as short name for selecting the choice via keyboard key press. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment