method
subscribe
v4.2.9 -
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 19
def subscribe(pattern = nil, block = Proc.new)
subscriber = Subscribers.new pattern, block
synchronize do
@subscribers << subscriber
@listeners_for.clear
end
subscriber
end