summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-12-12 14:13:13 +0000
committerSteve Kemp <steve@steve.org.uk>2012-12-12 14:13:13 +0000
commita97a84dd397168dc64e7621ccadc5ec8775b8aa2 (patch)
tree23eb68988bb10b74dde6e4b62d0c5b83f0fc50d6
parent2b95220b9cbdf8ad4bf63a09060f95d0b01e1104 (diff)
Allow the alerter to receive the settings object.
-rw-r--r--lib/custodian/alertfactory.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/custodian/alertfactory.rb b/lib/custodian/alertfactory.rb
index 39cf8cd..e0ec13f 100644
--- a/lib/custodian/alertfactory.rb
+++ b/lib/custodian/alertfactory.rb
@@ -17,12 +17,19 @@ module Custodian
# The target for the alert.
#
# The meaning of the target is notifier-specific.
+ #
# In the case of the smtp-notifier the target is the
# email address to notify, for example.
#
attr_reader :target
+ #
+ # The global configuration settings object.
+ #
+ attr_reader :settings
+
+
#
# The subclasses we have.
@@ -92,6 +99,15 @@ module Custodian
end
+
+ #
+ # Store a reference to the settings
+ #
+ def set_settings( obj )
+ @settings = obj
+ end
+
+
#
# Raise an alert.
#