Skip to content

Instantly share code, notes, and snippets.

@awwaiid awwaiid/oracle.rb
Created Mar 12, 2017

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.