Permalink
Browse files

private method is not needed

  • Loading branch information...
1 parent 4226c93 commit fa73e777a1dac2daaa14f781b8a17102ca47ea8b @tenderlove tenderlove committed Jul 17, 2010
Showing with 2 additions and 12 deletions.
  1. +2 −12 activesupport/lib/active_support/notifications/fanout.rb
@@ -45,7 +45,7 @@ def initialize(pattern, &block)
def publish(*args)
return unless subscribed_to?(args.first)
- push(*args)
+ @block.call(*args)
true
end
@@ -58,19 +58,9 @@ def subscribed_to?(name)
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

0 comments on commit fa73e77

Please sign in to comment.