Class: Rails::Queue::ActionMailer::QueuedMessage
- Inherits:
-
Delegator
- Object
- Delegator
- Rails::Queue::ActionMailer::QueuedMessage
- Defined in:
- lib/rails/queue/action_mailer/queued_message.rb
Defined Under Namespace
Classes: DeliveryJob
Instance Attribute Summary collapse
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
Instance Method Summary collapse
- #__getobj__ ⇒ Object
-
#deliver ⇒ Object
Queues the message for delivery.
-
#initialize(queue, mailer_class, method_name, *args) ⇒ QueuedMessage
constructor
A new instance of QueuedMessage.
Constructor Details
#initialize(queue, mailer_class, method_name, *args) ⇒ QueuedMessage
Returns a new instance of QueuedMessage.
10 11 12 13 |
# File 'lib/rails/queue/action_mailer/queued_message.rb', line 10 def initialize(queue, mailer_class, method_name, *args) @queue = queue @job = DeliveryJob.new(mailer_class, method_name, args) end |
Instance Attribute Details
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
8 9 10 |
# File 'lib/rails/queue/action_mailer/queued_message.rb', line 8 def queue @queue end |
Instance Method Details
#__getobj__ ⇒ Object
15 16 17 |
# File 'lib/rails/queue/action_mailer/queued_message.rb', line 15 def __getobj__ @job. end |
#deliver ⇒ Object
Queues the message for delivery.
20 21 22 |
# File 'lib/rails/queue/action_mailer/queued_message.rb', line 20 def deliver tap { @queue.push @job } end |