class MingleEvents::Processors::CategoryFilter

Removes events from the stream that do not match all of the specified categories

Public Class Methods

new(categories) click to toggle source
  # File lib/mingle_events/processors/category_filter.rb
7 def initialize(categories)
8   @categories = categories
9 end

Public Instance Methods

match?(event) click to toggle source
   # File lib/mingle_events/processors/category_filter.rb
11 def match?(event)
12   @categories.all?{|c| event.categories.include?(c)}
13 end