Class: Pendaxes::Notificator::Mail

Inherits:
Pendaxes::Notificator show all
Defined in:
lib/pendaxes/notificators/mail.rb

Instance Method Summary collapse

Methods inherited from Pendaxes::Notificator

#initialize, #report_for, #reporter

Methods included from Defaults

#defaults

Methods included from Finder

#announce, #find, #inherited

Methods included from PendingManager

#add, #all_pendings, #pendings, #reset

Constructor Details

This class inherits a constructor from Pendaxes::Notificator

Instance Method Details

#blacklistObject



27
28
29
# File 'lib/pendaxes/notificators/mail.rb', line 27

def blacklist
  @blacklist ||= process_email_filter(@config.blacklist)
end

#notifyObject



9
10
11
12
13
14
15
16
17
# File 'lib/pendaxes/notificators/mail.rb', line 9

def notify
  if @config.to
    deliver(pendings, @config.to)
  else
    pendings.group_by {|pending| pending[:commit][:email] }.each do |email, pends|
      deliver(pends, email)
    end
  end
end

#whitelistObject



19
20
21
22
23
24
25
# File 'lib/pendaxes/notificators/mail.rb', line 19

def whitelist
  if @config.whitelist
    @whitelist ||= process_email_filter(@config.whitelist)
  else
    nil
  end
end