From a97a84dd397168dc64e7621ccadc5ec8775b8aa2 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Wed, 12 Dec 2012 14:13:13 +0000 Subject: Allow the alerter to receive the settings object. --- lib/custodian/alertfactory.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib') 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. # -- cgit v1.2.1