Class: Wisper::BlockRegistration

Inherits:
Registration show all
Defined in:
lib/wisper/registration/block.rb

Instance Attribute Summary

Attributes inherited from Registration

#listener, #on

Instance Method Summary collapse

Methods inherited from Registration

#initialize

Constructor Details

This class inherits a constructor from Wisper::Registration

Instance Method Details

#broadcast(event, publisher, *args) ⇒ Object



3
4
5
6
7
# File 'lib/wisper/registration/block.rb', line 3

def broadcast(event, publisher, *args)
  if should_broadcast?(event)
    listener.call(*args)
  end
end