Created
January 9, 2016 22:25
-
-
Save kitlangton/1e37354a4386c5f691fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'timers' | |
timers = Timers::Group.new | |
@count = 10 | |
def message_slack_test | |
`curl --data ":pomodoro: #{@count}" $'https://vikingcodeschool.slack.com/services/hooks/slackbot?token=bii9bJoHe1mbns9bBm5lTpb6&channel=%23test'` | |
@count -= 1 | |
end | |
now_and_every_five_seconds = timers.now_and_every(5) { message_slack_test } | |
until @count == 0 | |
timers.wait | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment