From f0523f72b46db14e2f50c8347a8708734c650f84 Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Mon, 15 Feb 2010 21:44:30 +0700 Subject: Rename Rails::Subscriber to Rails::LogSubscriber --- activesupport/lib/active_support/notifications.rb | 4 ++-- activesupport/lib/active_support/notifications/fanout.rb | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/notifications.rb b/activesupport/lib/active_support/notifications.rb index 3e96decb8c..06d57765bc 100644 --- a/activesupport/lib/active_support/notifications.rb +++ b/activesupport/lib/active_support/notifications.rb @@ -9,7 +9,7 @@ module ActiveSupport # end # # You can consume those events and the information they provide by registering - # a subscriber. For instance, let's store all instrumented events in an array: + # a log subscriber. For instance, let's store all instrumented events in an array: # # @events = [] # @@ -35,7 +35,7 @@ module ActiveSupport # end # # Notifications ships with a queue implementation that consumes and publish events - # to subscribers in a thread. You can use any queue implementation you want. + # to log subscribers in a thread. You can use any queue implementation you want. # module Notifications autoload :Instrumenter, 'active_support/notifications/instrumenter' diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb index 0ec23da073..05de4946a5 100644 --- a/activesupport/lib/active_support/notifications/fanout.rb +++ b/activesupport/lib/active_support/notifications/fanout.rb @@ -1,10 +1,10 @@ module ActiveSupport module Notifications # This is a default queue implementation that ships with Notifications. It - # just pushes events to all registered subscribers. + # just pushes events to all registered log subscribers. class Fanout def initialize - @subscribers = [] + @log_subscribers = [] end def bind(pattern) @@ -12,11 +12,11 @@ module ActiveSupport end def subscribe(pattern = nil, &block) - @subscribers << Subscriber.new(pattern, &block) + @log_subscribers << LogSubscriber.new(pattern, &block) end def publish(*args) - @subscribers.each { |s| s.publish(*args) } + @log_subscribers.each { |s| s.publish(*args) } end # This is a sync queue, so there is not waiting. @@ -41,7 +41,7 @@ module ActiveSupport end end - class Subscriber #:nodoc: + class LogSubscriber #:nodoc: def initialize(pattern, &block) @pattern = pattern @block = block -- cgit v1.2.3