Module: Postmortem
- Defined in:
- lib/postmortem.rb,
lib/postmortem/index.rb,
lib/postmortem/layout.rb,
lib/postmortem/version.rb,
lib/postmortem/adapters.rb,
lib/postmortem/delivery.rb,
lib/postmortem/identity.rb,
lib/postmortem/adapters/base.rb,
lib/postmortem/adapters/mail.rb,
lib/postmortem/adapters/pony.rb,
lib/postmortem/configuration.rb,
lib/postmortem/adapters/action_mailer.rb
Overview
HTML email inspection tool.
Defined Under Namespace
Modules: Adapters
Classes: Configuration, Delivery, Error, Identity, Index, Layout
Constant Summary
collapse
- VERSION =
'0.3.3'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
27
28
29
|
# File 'lib/postmortem.rb', line 27
def config
@config
end
|
Class Method Details
.clear_inbox ⇒ Object
53
54
55
|
# File 'lib/postmortem.rb', line 53
def clear_inbox
config.preview_directory.rmtree
end
|
48
49
50
51
|
# File 'lib/postmortem.rb', line 48
def configure
@config = Configuration.new
yield @config if block_given?
end
|
.record_delivery(mail) ⇒ Object
33
34
35
36
37
|
# File 'lib/postmortem.rb', line 33
def record_delivery(mail)
Delivery.new(mail)
.tap(&:record)
.tap { |delivery| log_delivery(delivery) }
end
|
.root ⇒ Object
29
30
31
|
# File 'lib/postmortem.rb', line 29
def root
Pathname.new(__dir__).parent
end
|
.try_load(*args, plugin:) ⇒ Object
39
40
41
42
43
44
45
46
|
# File 'lib/postmortem.rb', line 39
def try_load(*args, plugin:)
args.each { |arg| require arg }
rescue LoadError
false
else
require "postmortem/plugins/#{plugin}"
true
end
|