Skip to content

Instantly share code, notes, and snippets.

@awwaiid
Created March 12, 2017 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awwaiid/ccae9a28227dfa1ff871c42218fe8ff1 to your computer and use it in GitHub Desktop.
Save awwaiid/ccae9a28227dfa1ff871c42218fe8ff1 to your computer and use it in GitHub Desktop.
#!/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