Class: Rails::Queue::ActionMailer::QueuedMessage::DeliveryJob
- Inherits:
-
Object
- Object
- Rails::Queue::ActionMailer::QueuedMessage::DeliveryJob
- Defined in:
- lib/rails/queue/action_mailer/queued_message.rb
Instance Method Summary collapse
-
#initialize(mailer_class, method_name, args) ⇒ DeliveryJob
constructor
A new instance of DeliveryJob.
- #message ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(mailer_class, method_name, args) ⇒ DeliveryJob
Returns a new instance of DeliveryJob.
25 26 27 28 29 |
# File 'lib/rails/queue/action_mailer/queued_message.rb', line 25 def initialize(mailer_class, method_name, args) @mailer_class = mailer_class @method_name = method_name @args = args end |
Instance Method Details
#message ⇒ Object
31 32 33 |
# File 'lib/rails/queue/action_mailer/queued_message.rb', line 31 def @message ||= @mailer_class.send(:new, @method_name, *@args). end |
#run ⇒ Object
35 36 37 |
# File 'lib/rails/queue/action_mailer/queued_message.rb', line 35 def run .deliver end |