Class: Puppi::Notifications::Mail

Inherits:
Object
  • Object
show all
Defined in:
lib/puppi/notifications/mail.rb

Instance Method Summary collapse

Constructor Details

#initializeMail

Returns a new instance of Mail.



6
7
8
# File 'lib/puppi/notifications/mail.rb', line 6

def initialize
  @loader = Puppi::Loader.new
end

Instance Method Details

#output(output) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/puppi/notifications/mail.rb', line 10

def output(output)
  @@output = output
  mails = load_all
  mails.each do |mail|
    mailer = @loader.load_notification(mail)
    send_mail (mailer) if valid_mailer?(mailer)
  end
end