Create a gist now

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
puts "I am the great ORACLE!!"
puts
puts "Ask me any question, if you dare!"
puts "BUT BEWARE!!!!"
puts
puts "You may not like the answer."
puts
loop do
print "Question (or 'exit'): "
question = readline.chomp
exit if question == "exit"
answers = [
"Yes.",
"No.",
"Maybe."
]
answer = answers.sample
puts "My WISE ANSWER: #{answer}"
puts
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment