Class: ActionMailer::StructuredEventSubscriber
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
ActiveSupport::StructuredEventSubscriber
|
Defined in: | actionmailer/lib/action_mailer/structured_event_subscriber.rb |
Constant Summary
Class Attribute Summary
::ActiveSupport::StructuredEventSubscriber
- Inherited
::ActiveSupport::Subscriber
- Inherited
Class Method Summary
::ActiveSupport::StructuredEventSubscriber
- Inherited
::ActiveSupport::Subscriber
- Inherited
.attach_to | Attach the subscriber to a namespace. |
.detach_from | Detach the subscriber from a namespace. |
.method_added | Adds event subscribers for all new methods added to the class. |
.new, .subscribers, .add_event_subscriber, .fetch_public_methods, .find_attached_subscriber, .invalid_event?, .pattern_subscribed?, .prepare_pattern, .remove_event_subscriber |
Instance Attribute Summary
::ActiveSupport::StructuredEventSubscriber
- Inherited
::ActiveSupport::Subscriber
- Inherited
Instance Method Summary
-
#deliver(event)
An email was delivered.
-
#process(event)
An email was generated.
::ActiveSupport::StructuredEventSubscriber
- Inherited
#call, | |
#emit_debug_event | Like |
#emit_event | Emit a structured event via Rails.event.notify. |
#silenced?, #handle_event_error |
::ActiveSupport::Subscriber
- Inherited
Constructor Details
This class inherits a constructor from ActiveSupport::StructuredEventSubscriber
Instance Method Details
#deliver(event)
An email was delivered.
# File 'actionmailer/lib/action_mailer/structured_event_subscriber.rb', line 8
def deliver(event) exception = event.payload[:exception_object] payload = { message_id: event.payload[: ], duration: event.duration.round(2), mail: event.payload[:mail], perform_deliveries: event.payload[:perform_deliveries], } if exception payload[:exception_class] = exception.class.name payload[: ] = exception. end emit_debug_event("action_mailer.delivered", payload) end
#process(event)
An email was generated.
# File 'actionmailer/lib/action_mailer/structured_event_subscriber.rb', line 27
def process(event) emit_debug_event("action_mailer.processed", mailer: event.payload[:mailer], action: event.payload[:action], duration: event.duration.round(2), ) end