Sha256: a143288d07f3dd0dfa564c32f85f081530b1a8be069bea4c2922cc6658269d4c
Contents?: true
Size: 841 Bytes
Versions: 10
Compression:
Stored size: 841 Bytes
Contents
class EcoRake module Utils module Mailing # @return [EcoRake::Mailer] def mailer @mailer ||= EcoRake::Utils::Mailer.new end def email(subject:, body:, to:, enviro: nil) has_enviro = enviro && subject && subject.downcase.include?(enviro.downcase) subject = "#{enviro.upcase} - #{subject}" if enviro && !has_enviro mailer.mail(**{ to: to, subject: subject, body: body }) end # Helper to notify that there are no files to be processed def email_missing_files(enviro:, to:) email(**{ to: to, subject: "#{enviro.upcase} (No files to be processed)", body: 'No files found to be processed. Aborting...' }) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems