Closed ioquatix closed 5 years ago
Here is how I used to use it (which worked):
zone = prompt.select("What zone do you want to update?", @connection.zones)
I checked and it worked this way from 0.12.x
through to at least 0.16.x
. The version I tested where it stopped working was 0.18.x
.
I think if you supply objects that respond with #to_s
it should be okay.
Hope this is sufficient, sorry pretty busy today but wanted to contribute to your project, it's awesome, thanks for your kind consideration.
Considering https://github.com/piotrmurach/tty-prompt/blob/00e1b21520f0af030451245c24e79b99e8c3b0b8/lib/tty/prompt/choice.rb#L29-L47
Is there any reason why the default can't be
new(val, val)
rather than raising an exception?