Skip to content

Instantly share code, notes, and snippets.

@dqminh
Created November 15, 2011 11:29
Show Gist options
  • Select an option

  • Save dqminh/1366849 to your computer and use it in GitHub Desktop.

Select an option

Save dqminh/1366849 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
def get_time(format="%H:%M")
Time.now.strftime("%H:%M")
end
case get_time
when "09:00"
`say you should finish your breakfast in 10 minutes`
when "11:55"
`say lunch in 5 minutes`
when "17:40"
`say show and tell in 5 minutes`
when "17:00"
`say Beer time` if get_time("%A") == "Friday"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment