Skip to content
Browse files

Improve the readability of Server::Application#channel some.

  • Loading branch information...
1 parent 69ad12f commit ada97e621ba8de047106134d551c8dcb48c57488 @tristandunn committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/pusher-fake/server/application.rb
View
4 lib/pusher-fake/server/application.rb
@@ -18,7 +18,9 @@ def self.call(environment)
#
# @return [String] The channel name.
def self.channel
- path.match(%r{/apps/#{PusherFake.configuration.app_id}/channels/(.+)/events}i)[1]
+ matcher = %r{/apps/#{PusherFake.configuration.app_id}/channels/(.+)/events}i
+ matches = path.match(matcher)
+ matches[1]
end
# Parse and return the event data from the request JSON.

0 comments on commit ada97e6

Please sign in to comment.
Something went wrong with that request. Please try again.