diff options
Diffstat (limited to 'lib/mauve/configuration_builders')
-rw-r--r-- | lib/mauve/configuration_builders/alert_group.rb | 6 | ||||
-rw-r--r-- | lib/mauve/configuration_builders/notification_method.rb | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/mauve/configuration_builders/alert_group.rb b/lib/mauve/configuration_builders/alert_group.rb index c652de8..56c446d 100644 --- a/lib/mauve/configuration_builders/alert_group.rb +++ b/lib/mauve/configuration_builders/alert_group.rb @@ -20,15 +20,15 @@ module Mauve # @return [Mauve::Notification] New notification instance. def builder_setup(*who) who = who.map do |username| - #raise BuildException.new("You haven't declared who #{username} is") unless - # @context.people[username] - #@context.people[username] if @context.people[username] @context.people[username] + elsif @context.people_lists[username] @context.people_lists[username] + else raise ArgumentError.new("You have not declared who #{username} is") + end end @result = Mauve::Notification.new(who, @context.last_alert_group.level) diff --git a/lib/mauve/configuration_builders/notification_method.rb b/lib/mauve/configuration_builders/notification_method.rb index 9596587..3f9283e 100644 --- a/lib/mauve/configuration_builders/notification_method.rb +++ b/lib/mauve/configuration_builders/notification_method.rb @@ -35,6 +35,10 @@ module Mauve def result @result ||= @provider_class.new(@name) end + + def debug! + result.extend(Mauve::Notifiers::Debug) + end # This catches all methods available for a provider, as needed. # |