Sha256: af8b496c53d4d4bb6e1e82c14287f65583badeaf6a0af013941be4157d91995b
Contents?: true
Size: 283 Bytes
Versions: 26
Compression:
Stored size: 283 Bytes
Contents
module Routemaster module Middleware class PayloadFilter # Filters duplicate events by url and type in a single payload. def run(payload) payload.group_by { |event| [event['url'], event['type']] }.map { |_, events| events.last } end end end end
Version data entries
26 entries across 26 versions & 1 rubygems