Skip to content

Instantly share code, notes, and snippets.

@vaskoz
Created April 22, 2010 20:26
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 vaskoz/375773 to your computer and use it in GitHub Desktop.
Save vaskoz/375773 to your computer and use it in GitHub Desktop.
answer
options = { :choices => 'jokes, sports',
:repeat => 3 }
result = ask 'For jokes, just say jokes. For sports, say sports.', options
if result.name == 'choice'
case result.value
when 'jokes'
say "The priest was preparing a dying man for his voyage into the great beyond. Whispering firmly, the priest said, Denounce the devil! Let him know how little you think of his evil! The dying man said nothing. The priest repeated his order. Still the dying man said nothing. The priest asked, Why do you refuse to denounce the devil and his evil? The dying man said, Until I know where I'm heading, I don't think I ought to aggravate anybody." when 'sports'
say "Cubs suck, or they don't."
end
end
hangup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment