Class: EcoRake::Lib::Notify::Mailer

Inherits:
BaseTask show all
Defined in:
lib/eco-rake/lib/notify/mailer.rb

Constant Summary

Constants inherited from EcoRake

VERSION

Instance Method Summary collapse

Instance Method Details

#task(*_args) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/eco-rake/lib/notify/mailer.rb', line 11

def task(*_args)
  kargs = {
    to:      options[:to],
    subject: options[:subject],
    body:    options[:body]
  }
  kargs.merge!(cc: options[:cc])   if options[:cc]
  kargs.merge!(bcc: options[:bcc]) if options[:bcc]
  mailer.mail(**kargs)
end