Created
April 7, 2011 13:39
-
-
Save casualjim/907789 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
BackchatIO("firstbox", :api_key => "the_key").each do |message| | |
# do stuff with message here | |
end | |
def BackchatIO(name, params) | |
Backchat::Stream.new(name, params) | |
end | |
module Backchat | |
class Stream(name, params) | |
# wrap fetcher here | |
def each(&b) | |
fetcher.listen(stream_params, &b) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment