Skip to content

Instantly share code, notes, and snippets.

@esparkman
Forked from jackdempsey/gist:572259
Created September 9, 2010 20:11
Show Gist options
  • Save esparkman/572466 to your computer and use it in GitHub Desktop.
Save esparkman/572466 to your computer and use it in GitHub Desktop.
~ > cat foo.rb
#!/usr/bin/env ruby
loop do
puts "whatcha wanna do"
answer = gets.chomp
case answer
when '1'
puts "one is dumb"
when '2'
puts "there we go"
when 'q'
puts "Cya"
exit
end
end
~ > vim foo.rb
~ > ./foo.rb
whatcha wanna do
1
one is dumb
whatcha wanna do
2
there we go
whatcha wanna do
q
Cya
~ >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment