Sha256: 4f4d766bbf30c1932349105ccd9ecc97ea2f072a79602ac067f16562486b711b
Contents?: true
Size: 439 Bytes
Versions: 23
Compression:
Stored size: 439 Bytes
Contents
module Eventus module Dispatchers class Synchronous attr_accessor :action def initialize(persistence, &block) @persistence = persistence @action = block || lambda {} end def dispatch(events) Eventus.logger.info "Dispatching #{events.length} events" events.each do |e| @action.call(e) @persistence.mark_dispatched e end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems