aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/notifications
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-17 14:44:29 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-17 14:44:29 -0700
commitfa73e777a1dac2daaa14f781b8a17102ca47ea8b (patch)
tree6124139af2c7f7a8b54aec47fe7c875ff6d2f9bb /activesupport/lib/active_support/notifications
parent4226c93779dae53c6921f8ce93d6af000a24e2d1 (diff)
downloadrails-fa73e777a1dac2daaa14f781b8a17102ca47ea8b.tar.gz
rails-fa73e777a1dac2daaa14f781b8a17102ca47ea8b.tar.bz2
rails-fa73e777a1dac2daaa14f781b8a17102ca47ea8b.zip
private method is not needed
Diffstat (limited to 'activesupport/lib/active_support/notifications')
-rw-r--r--activesupport/lib/active_support/notifications/fanout.rb14
1 files changed, 2 insertions, 12 deletions
diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb
index fa469c8b79..6dfc3c0a99 100644
--- a/activesupport/lib/active_support/notifications/fanout.rb
+++ b/activesupport/lib/active_support/notifications/fanout.rb
@@ -45,7 +45,7 @@ module ActiveSupport
def publish(*args)
return unless subscribed_to?(args.first)
- push(*args)
+ @block.call(*args)
true
end
@@ -58,19 +58,9 @@ module ActiveSupport
end
def matches?(subscriber_or_name)
- case subscriber_or_name
- when String
+ self === subscriber_or_name ||
@pattern && @pattern === subscriber_or_name
- when self
- true
- end
end
-
- private
-
- def push(*args)
- @block.call(*args)
- end
end
end
end