Sha256: 423e3f98376f1a639d3d7193360230eb08d5ddddc433d69bd8934a60fb8ebd78
Contents?: true
Size: 373 Bytes
Versions: 1
Compression:
Stored size: 373 Bytes
Contents
module Eventus module Dispatchers class Synchronous attr_accessor :action def initialize(persistence, &block) @persistence = persistence @action = block || lambda {} end def dispatch(events) events.each do |e| @action.call(e) @persistence.mark_dispatched e end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eventus-0.3.0 | lib/eventus/dispatchers/synchronous.rb |