class MingleEvents::Processors::AuthorFilter

Removes all events from stream not triggered by the specified author

Public Class Methods

new(spec, mingle_access, project_identifier) click to toggle source
   # File lib/mingle_events/processors/author_filter.rb
 7 def initialize(spec, mingle_access, project_identifier)
 8   unless spec.size == 1
 9     raise "Author spec must contain 1 and only 1 piece of criteria (the only legal criteria are each unique identifiers in and of themselves so multiple criteria is not needed.)"
10   end
11   
12   @author_spec = AuthorSpec.new(spec, mingle_access, project_identifier)
13 end

Public Instance Methods

match?(event) click to toggle source
   # File lib/mingle_events/processors/author_filter.rb
15 def match?(event)
16   @author_spec.event_triggered_by?(event)
17 end