Created
October 22, 2011 19:35
-
-
Save smathy/1306400 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
in_foobar_queue = (queue_array) -> | |
ret = false | |
queue_array.each (queue_id) -> | |
queue_name = http.get("http://foo.com/queue/#{queue_id}").name | |
if queue_name == 'foobar' | |
ret = true | |
break | |
return ret | |
ticket = http.get('http://foo.com/ticket/45') | |
if in_foobar_queue( ticket.queues ) | |
# do something | |
else | |
# do something else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment