Class: Postmortem::Configuration
- Inherits:
-
Object
- Object
- Postmortem::Configuration
- Defined in:
- lib/postmortem/configuration.rb
Overview
Provides interface for configuring Postmortem and implements sensible defaults.
Instance Attribute Summary collapse
- #colorize ⇒ Object
-
#log_path ⇒ Object
Returns the value of attribute log_path.
- #mail_skip_delivery ⇒ Object
Instance Method Summary collapse
- #layout ⇒ Object
- #layout=(val) ⇒ Object
- #preview_directory ⇒ Object
- #preview_directory=(val) ⇒ Object
Instance Attribute Details
#colorize ⇒ Object
9 10 11 |
# File 'lib/postmortem/configuration.rb', line 9 def colorize defined?(@colorize) ? @colorize : true end |
#log_path ⇒ Object
Returns the value of attribute log_path.
7 8 9 |
# File 'lib/postmortem/configuration.rb', line 7 def log_path @log_path end |
#mail_skip_delivery ⇒ Object
31 32 33 |
# File 'lib/postmortem/configuration.rb', line 31 def mail_skip_delivery defined?(@mail_skip_delivery) ? @mail_skip_delivery : true end |
Instance Method Details
#layout ⇒ Object
21 22 23 24 25 |
# File 'lib/postmortem/configuration.rb', line 21 def layout default = File.(File.join(__dir__, '..', '..', 'layout', 'default')) path = Pathname.new(@layout || default) path.extname.empty? ? path.sub_ext('.html.erb') : path end |
#layout=(val) ⇒ Object
17 18 19 |
# File 'lib/postmortem/configuration.rb', line 17 def layout=(val) @layout = Pathname.new(val) end |
#preview_directory ⇒ Object
27 28 29 |
# File 'lib/postmortem/configuration.rb', line 27 def preview_directory @preview_directory ||= Pathname.new(File.join(Dir.tmpdir, 'postmortem')) end |
#preview_directory=(val) ⇒ Object
13 14 15 |
# File 'lib/postmortem/configuration.rb', line 13 def preview_directory=(val) @preview_directory = Pathname.new(val) end |