From fa73e777a1dac2daaa14f781b8a17102ca47ea8b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 17 Jul 2010 14:44:29 -0700 Subject: private method is not needed --- activesupport/lib/active_support/notifications/fanout.rb | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'activesupport/lib') 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 -- cgit v1.2.3