Module: Celluloid::Notifications
Defined Under Namespace
Classes: Fanout, Subscriber
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.notifier ⇒ Object
3
4
5
|
# File 'lib/celluloid/notifications.rb', line 3
def self.notifier
Actor[:notifications_fanout] || fail(DeadActorError, "notifications fanout actor not running")
end
|
.publish(pattern, *args) ⇒ Object
7
8
9
10
11
12
|
# File 'lib/celluloid/notifications.rb', line 7
def publish(pattern, *args)
Celluloid::Notifications.notifier.publish(pattern, *args)
rescue DeadActorError
end
|
Instance Method Details
#subscribe(pattern, method) ⇒ Object
16
17
18
|
# File 'lib/celluloid/notifications.rb', line 16
def subscribe(pattern, method)
Celluloid::Notifications.notifier.subscribe(Actor.current, pattern, method)
end
|
#unsubscribe(*args) ⇒ Object