Class: SendgridNotification::BaseMailer
- Inherits:
-
Object
- Object
- SendgridNotification::BaseMailer
show all
- Defined in:
- app/models/sendgrid_notification/base_mailer.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(params = {}) ⇒ BaseMailer
5
6
7
8
9
|
# File 'app/models/sendgrid_notification/base_mailer.rb', line 5
def initialize(params = {})
_params = params.with_indifferent_access
@from = _params.fetch(:mail_from) { Rails.application.config.sendgrid_notification.mail_from }
@from_name = _params.fetch(:mail_from_name) { Rails.application.config.sendgrid_notification.mail_from_name }
end
|
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
3
4
5
|
# File 'app/models/sendgrid_notification/base_mailer.rb', line 3
def from
@from
end
|
#from_name ⇒ Object
Returns the value of attribute from_name.
3
4
5
|
# File 'app/models/sendgrid_notification/base_mailer.rb', line 3
def from_name
@from_name
end
|
Instance Method Details
#last_result ⇒ Object
15
16
17
|
# File 'app/models/sendgrid_notification/base_mailer.rb', line 15
def last_result
raise NotImplementedError, "you should implement #{self.class}##{__method__}"
end
|
#last_result_success? ⇒ Boolean
19
20
21
|
# File 'app/models/sendgrid_notification/base_mailer.rb', line 19
def last_result_success?
raise NotImplementedError, "you should implement #{self.class}##{__method__}"
end
|
#sendmail(to, notification_mail, params = {}) ⇒ Object
11
12
13
|
# File 'app/models/sendgrid_notification/base_mailer.rb', line 11
def sendmail(to, notification_mail, params = {})
raise NotImplementedError, "you should implement #{self.class}##{__method__}"
end
|