Class: Whoops::NotificationSubscription::Matcher
- Inherits:
-
Object
- Object
- Whoops::NotificationSubscription::Matcher
- Defined in:
- app/models/whoops/notification_subscription.rb
Instance Attribute Summary collapse
-
#event_group ⇒ Object
Returns the value of attribute event_group.
Instance Method Summary collapse
-
#initialize(event_group) ⇒ Matcher
constructor
A new instance of Matcher.
- #matching_emails ⇒ Object
Constructor Details
#initialize(event_group) ⇒ Matcher
Returns a new instance of Matcher.
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_group ⇒ Object
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_emails ⇒ Object
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 |