Created
September 13, 2011 18:01
-
-
Save jbeasley6651/1214528 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 'pusher' | |
Pusher.app_id = 'APP ID' | |
Pusher.key = 'APP KEY' | |
Pusher.secret = 'APP SECRET' | |
def broadcast(event, channel, &block) | |
message = capture(&block) | |
Pusher[channel].trigger(event, message) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment