Class: ActionMailer::Parameterized::MessageDelivery
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
ActionMailer::MessageDelivery
|
Defined in: | actionmailer/lib/action_mailer/parameterized.rb |
Class Method Summary
::ActionMailer::MessageDelivery
- Inherited
Instance Attribute Summary
::ActionMailer::MessageDelivery
- Inherited
#processed? | Was the delegate loaded, causing the mailer action to be processed? |
Instance Method Summary
- #enqueue_delivery(delivery_method, options = {}) private
- #processed_mailer private
::ActionMailer::MessageDelivery
- Inherited
#deliver_later | Enqueues the email to be delivered through Active Job. |
#deliver_later! | Enqueues the email to be delivered through Active Job. |
#deliver_now | Delivers an email: |
#deliver_now! | Delivers an email without checking |
#message | Returns the resulting |
#enqueue_delivery, | |
#processed_mailer | Returns the processed |
#__getobj__ |
|
#__setobj__ | Unused except for delegator internals (dup, marshalling). |
::Delegator
- Inherited
#try | See Object#try |
#try! | See Object#try! |
::ActiveSupport::Tryable
- Included
Constructor Details
.new(mailer_class, action, params) ⇒ MessageDelivery
# File 'actionmailer/lib/action_mailer/parameterized.rb', line 131
def initialize(mailer_class, action, params, ...) super(mailer_class, action, ...) @params = params end
Instance Method Details
#enqueue_delivery(delivery_method, options = {}) (private)
[ GitHub ]# File 'actionmailer/lib/action_mailer/parameterized.rb', line 144
def enqueue_delivery(delivery_method, = {}) if processed? super else @mailer_class.delivery_job.set( ).perform_later( @mailer_class.name, @action.to_s, delivery_method.to_s, params: @params, args: @args) end end
#processed_mailer (private)
[ GitHub ]# File 'actionmailer/lib/action_mailer/parameterized.rb', line 137
def processed_mailer @processed_mailer ||= @mailer_class.new.tap do |mailer| mailer.params = @params mailer.process @action, *@args end end