Class: EventBus::Registrations::BlockRegistration

Inherits:
Struct
  • Object
show all
Defined in:
lib/event_bus/registrations.rb

Instance Method Summary collapse

Instance Method Details

#respond(event_name, payload) ⇒ Object



42
43
44
# File 'lib/event_bus/registrations.rb', line 42

def respond(event_name, payload)
  block.call(payload) if pattern === event_name
end