Class: Plumbing::Pipeline::Except

Inherits:
Base show all
Defined in:
lib/plumbing/pipeline/except.rb

Overview

Emits every event EXCEPT those whose type name matches one of the filters (trailing * is a prefix wildcard, e.g. "Error*").

Constant Summary

Constants included from Actor

Actor::FIBER_KEY, Actor::NotSupported

Instance Attribute Summary

Attributes included from Actor

#worker

Instance Method Summary collapse

Methods inherited from Base

#<<

Methods included from Actor

#after, #cancel_deferred, #current_sender, #current_senders, included

Methods included from Actor::Configuration

#register, #selected_worker_type, #uses, #worker_for, #worker_types, #workers

Constructor Details

#initialize(source:, filters: []) ⇒ Except

Returns a new instance of Except.



10
11
12
13
14
# File 'lib/plumbing/pipeline/except.rb', line 10

def initialize(source:, filters: [])
  super()
  list = Array(filters)
  chain(source) { |event| !wildcard_match?(list, event.class.name) }
end