lib/websocket_rails/channel_manager.rb in websocket-rails-0.1.5 vs lib/websocket_rails/channel_manager.rb in websocket-rails-0.1.6
- old
+ new
@@ -1,5 +1,7 @@
+require 'active_support/hash_with_indifferent_access'
+
module WebsocketRails
class << self
def channel_manager
@@ -15,10 +17,10 @@
class ChannelManager
attr_reader :channels
def initialize
- @channels = Hash.new.with_indifferent_access
+ @channels = HashWithIndifferentAccess.new
end
def [](channel)
@channels[channel] ||= Channel.new channel
end