method
subscribe
v3.2.13 -
Show latest stable
- Class:
ActiveSupport::Notifications::Fanout
subscribe(pattern = nil, block = Proc.new)public
No documentation available.
# File activesupport/lib/active_support/notifications/fanout.rb, line 11
def subscribe(pattern = nil, block = Proc.new)
subscriber = Subscriber.new(pattern, block).tap do |s|
@subscribers << s
end
@listeners_for.clear
subscriber
end