aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable/server/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action_cable/server/base.rb')
-rw-r--r--lib/action_cable/server/base.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/action_cable/server/base.rb b/lib/action_cable/server/base.rb
index b09fbf6da4..43849928b9 100644
--- a/lib/action_cable/server/base.rb
+++ b/lib/action_cable/server/base.rb
@@ -36,11 +36,11 @@ module ActionCable
@worker_pool ||= ActionCable::Server::Worker.pool(size: config.worker_pool_size)
end
- # Requires and returns an array of all the channel class constants in this application.
+ # Requires and returns an hash of all the channel class constants keyed by name.
def channel_classes
@channel_classes ||= begin
config.channel_paths.each { |channel_path| require channel_path }
- config.channel_class_names.collect { |name| name.constantize }
+ config.channel_class_names.each_with_object({}) { |name, hash| hash[name] = name.constantize }
end
end