Class: SendgridNotification::NullMailer
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
Instance Method Details
#last_result ⇒ Object
14
15
16
|
# File 'app/models/sendgrid_notification/null_mailer.rb', line 14
def last_result
results.last
end
|
#last_result_success? ⇒ 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, attachments = []) ⇒ Object
9
10
11
12
|
# File 'app/models/sendgrid_notification/null_mailer.rb', line 9
def sendmail(to, notification_mail, params, attachments = [])
body = notification_mail.apply(params)
results << Result.new(from, to, notification_mail.subject, body, Time.now, attachments)
end
|