Module: Wisper::Publisher::ClassMethods

Defined in:
lib/wisper/publisher.rb

Instance Method Summary collapse

Instance Method Details

#subscribe(listener, **options) ⇒ Object

subscribe a listener

Examples:

MyPublisher.subscribe(MyListener.new)


58
59
60
# File 'lib/wisper/publisher.rb', line 58

def subscribe(listener, **options)
  GlobalListeners.subscribe(listener, **options.merge(:scope => self))
end