Sha256: 86d9bc656b6e734fdc3505ba1be67a18e2875ec35603496f9bfcf178333c0093
Contents?: true
Size: 595 Bytes
Versions: 10
Compression:
Stored size: 595 Bytes
Contents
require 'active_support/hash_with_indifferent_access' module WebsocketRails class << self def channel_manager @channel_manager ||= ChannelManager.new end def [](channel) channel_manager[channel] end end class ChannelManager attr_reader :channels def initialize @channels = HashWithIndifferentAccess.new end def [](channel) @channels[channel] ||= Channel.new channel end def unsubscribe(connection) @channels.each do |channel_name, channel| channel.unsubscribe(connection) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems