Class: RorVsWild::Plugin::ActionMailer

Inherits:
Object
  • Object
show all
Defined in:
lib/rorvswild/plugin/action_mailer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.setupObject


4
5
6
7
8
9
# File 'lib/rorvswild/plugin/action_mailer.rb', line 4

def self.setup
  return if @installed
  return unless defined?(::ActiveSupport::Notifications.subscribe)
  ActiveSupport::Notifications.subscribe("deliver.action_mailer", new)
  @installed = true
end

Instance Method Details

#finish(name, id, payload) ⇒ Object


15
16
17
18
19
20
# File 'lib/rorvswild/plugin/action_mailer.rb', line 15

def finish(name, id, payload)
  RorVsWild::Section.stop do |section|
    section.command = payload[:mailer]
    section.kind = "mail".freeze
  end
end

#start(name, id, payload) ⇒ Object


11
12
13
# File 'lib/rorvswild/plugin/action_mailer.rb', line 11

def start(name, id, payload)
  RorVsWild::Section.start
end