instance method
unsubscribe
Ruby on Rails 5.2.8.1
Since v3.0.20Signature
unsubscribe(subscriber_or_name)
No documentation comment.
Parameters
-
subscriber_or_namereq
Source
# File activesupport/lib/active_support/notifications/fanout.rb, line 30
def unsubscribe(subscriber_or_name)
synchronize do
case subscriber_or_name
when String
@subscribers.reject! { |s| s.matches?(subscriber_or_name) }
else
@subscribers.delete(subscriber_or_name)
end
@listeners_for.clear
end
end
Defined in activesupport/lib/active_support/notifications/fanout.rb line 30
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Notifications::Fanout