instance method
subscribe
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
subscribe(pattern = nil, block = Proc.new)
No documentation comment.
Parameters
-
patternopt = nil -
blockopt = Proc.new
Source
# 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
Defined in activesupport/lib/active_support/notifications/fanout.rb line 11
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Notifications::Fanout