Flowdock
subscribe(pattern = nil, callable = nil, monotonic: false, &block) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/notifications/fanout.rb, line 24
      def subscribe(pattern = nil, callable = nil, monotonic: false, &block)
        subscriber = Subscribers.new(pattern, callable || block, monotonic)
        synchronize do
          if String === pattern
            @string_subscribers[pattern] << subscriber
            @listeners_for.delete(pattern)
          else
            @other_subscribers << subscriber
            @listeners_for.clear
          end
        end
        subscriber
      end
Register or log in to add new notes.