Class: Postmortem::Index
- Inherits:
-
Object
- Object
- Postmortem::Index
- Defined in:
- lib/postmortem/index.rb
Overview
Generates and parses an index of previously-sent emails.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(index_path, mail_path, mail) ⇒ Index
constructor
A new instance of Index.
- #size ⇒ Object
Constructor Details
#initialize(index_path, mail_path, mail) ⇒ Index
Returns a new instance of Index.
6 7 8 9 10 |
# File 'lib/postmortem/index.rb', line 6 def initialize(index_path, mail_path, mail) @index_path = index_path @mail_path = mail_path @mail = mail end |
Instance Method Details
#content ⇒ Object
12 13 14 15 |
# File 'lib/postmortem/index.rb', line 12 def content mail_path = @mail_path ERB.new(File.read(template_path), trim_mode: '-').result(binding) end |
#size ⇒ Object
17 18 19 |
# File 'lib/postmortem/index.rb', line 17 def size encoded_index.size end |