Sha256: 2e15e3b2a7b9b300fb7a4e4d80d5b9ca55e5409e0e5ea9ca310a4ee61176ebc0
Contents?: true
Size: 589 Bytes
Versions: 28
Compression:
Stored size: 589 Bytes
Contents
# frozen_string_literal: true module PgEventstore # @!visibility private class EventSerializer attr_reader :middlewares # @param middlewares [Array<#deserialize, #serialize>] def initialize(middlewares) @middlewares = middlewares end # @param event [PgEventstore::Event] # @return [PgEventstore::Event] def serialize(event) @middlewares.each do |middleware| middleware.serialize(event) end event end # @return [PgEventstore::EventSerializer] def without_middlewares self.class.new([]) end end end
Version data entries
28 entries across 28 versions & 1 rubygems