Class: Whoops::NotificationSubscription::Matcher

Inherits:
Object
  • Object
show all
Defined in:
app/models/whoops/notification_subscription.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_group) ⇒ Matcher

Returns a new instance of Matcher.

Parameters:



19
20
21
# File 'app/models/whoops/notification_subscription.rb', line 19

def initialize(event_group)
  self.event_group = event_group
end

Instance Attribute Details

#event_groupObject

Returns the value of attribute event_group.



16
17
18
# File 'app/models/whoops/notification_subscription.rb', line 16

def event_group
  @event_group
end

Instance Method Details

#matching_emailsObject



23
24
25
26
27
28
# File 'app/models/whoops/notification_subscription.rb', line 23

def matching_emails
  Whoops::NotificationSubscription.all.select do |ns|
    lookup = Whoops::AuthorizedServiceLookup.new(ns.email)
    ns.filter.matches_event_group?(self.event_group)
  end.collect(&:email)
end