Skip to content

Instantly share code, notes, and snippets.

@reinh
Created May 31, 2010 02:22
Show Gist options
  • Save reinh/419480 to your computer and use it in GitHub Desktop.
Save reinh/419480 to your computer and use it in GitHub Desktop.
state = :ready
loop do
case state
when :ready
puts "Ready!"
state = :set
when :set
puts "Set!"
state = :go
when :go
puts "GO!"
state = :stop
when :stop
puts "Stopping."
break
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment