Class: SendgridNotification::NullMailer

Inherits:
BaseMailer
  • Object
show all
Includes:
MailRecordable
Defined in:
app/models/sendgrid_notification/null_mailer.rb

Defined Under Namespace

Classes: Result

Constant Summary collapse

@@results =
[]

Instance Attribute Summary

Attributes inherited from BaseMailer

#from, #from_name

Instance Method Summary collapse

Methods inherited from BaseMailer

#initialize

Constructor Details

This class inherits a constructor from SendgridNotification::BaseMailer

Instance Method Details

#last_resultObject



14
15
16
# File 'app/models/sendgrid_notification/null_mailer.rb', line 14

def last_result
  results.last
end

#last_result_success?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/models/sendgrid_notification/null_mailer.rb', line 18

def last_result_success?
  results.present?
end

#sendmail(to, notification_mail, params = {}) ⇒ Object



9
10
11
12
# File 'app/models/sendgrid_notification/null_mailer.rb', line 9

def sendmail(to, notification_mail, params = {})
  body = notification_mail.apply(params)
  results << Result.new(from, to, notification_mail.subject, body, Time.now)
end