aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/alert_group.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mauve/alert_group.rb')
-rw-r--r--lib/mauve/alert_group.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/mauve/alert_group.rb b/lib/mauve/alert_group.rb
index a8b1482..4895200 100644
--- a/lib/mauve/alert_group.rb
+++ b/lib/mauve/alert_group.rb
@@ -101,6 +101,13 @@ module Mauve
# @param [Alert] alert An alert to test for belongness to group.
# @return [Boolean] Success or failure.
def matches_alert?(alert)
+
+ unless alert.is_a?(Alert)
+ logger.warn "Got given a #{alert.class} instead of an Alert!"
+ logger.debug caller.join("\n")
+ return false
+ end
+
result = alert.instance_eval(&self.includes)
if true == result or
true == result.instance_of?(MatchData)