Sha256: 2e81a9a1b472b5c73ec7244a1a21ec3f8f690b6a55d401e4f83af64dfd9afb41

Contents?: true

Size: 967 Bytes

Versions: 5

Compression:

Stored size: 967 Bytes

Contents

# encoding: utf-8

require_relative '../lib/tty-prompt'

prompt = TTY::Prompt.new

quotes = [
  "There are certain queer times and occasions in this strange mixed affair we call life when a man takes this whole universe for a vast practical joke, though the wit thereof he but dimly discerns, and more than suspects that the joke is at nobody's expense but his own.",
  "Talk not to me of blasphemy, man;\n I'd strike the sun if it insulted me.",
  "There is a wisdom that is woe; but there is a woe that is madness. And there is a Catskill eagle in some souls that can alike dive down into the blackest gorges, and soar out of them again and become invisible in the sunny spaces. And even if he for ever flies within the gorge, that gorge is in the mountains; so that even in his lowest swoop the mountain eagle is still higher than other birds upon the plain, even though they soar."
]

answer = prompt.select('Chose your quote?', quotes)

puts "Answer: #{answer}"

Version data entries

5 entries across 5 versions & 1 rubygems

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