Method: Wisper::GlobalListeners#subscribe

Defined in:
lib/wisper/global_listeners.rb

#subscribe(*listeners, **options) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/wisper/global_listeners.rb', line 16

def subscribe(*listeners, **options)
  with_mutex do
    listeners.each do |listener|
      @registrations << ObjectRegistration.new(listener, **options)
    end
  end
  self
end