summaryrefslogtreecommitdiff
path: root/lib
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
commit7b79a3ef686fad23bd68a59ce5573699bb059adc (patch)
tree4f9be691903f5f48f6e206a4d1e5334e75a57ba7 /lib
parentb7854079e61110a848b220693abbe4056f35be49 (diff)
Allow the alerter to receive the settings object.
Diffstat (limited to 'lib')
-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.
#