Sha256: 0272c2831f7d31032162b4013caa3e478e57a21e8570855a843682befede7e4a
Contents?: true
Size: 534 Bytes
Versions: 15
Compression:
Stored size: 534 Bytes
Contents
var PusherBus = Class.extend({ init: function(config){ delete config.bus_name var key = config.key delete config.key this.pusher = new Pusher(key, config); }, subscribe: function(subscription){ this.channel = this.pusher.subscribe(this.get_channel_name(subscription.channel)); this.channel.bind('publish', function(data){ subscription.callback(data); }) }, get_channel_name: function(channel_name){ return channel_name.replace(/::/g, '.') } }) PusherBus.third_party_library = 'Pusher'
Version data entries
15 entries across 15 versions & 1 rubygems