Class: Tape::Adapters::ActionMailer::Maildir
- Defined in:
- lib/tape/adapters/action_mailer/maildir.rb
Overview
For ActionMailer with delivery_method = :maildir.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #all ⇒ Object
-
#initialize(options = {}) ⇒ Maildir
constructor
A new instance of Maildir.
- #last ⇒ Object
- #reset ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ Maildir
Returns a new instance of Maildir.
12 13 14 15 16 |
# File 'lib/tape/adapters/action_mailer/maildir.rb', line 12 def initialize( = {}) super @maildir = ::Maildir.new([:path]) @maildir.serializer = ::Maildir::Serializer::Mail.new end |
Instance Method Details
#all ⇒ Object
18 19 20 |
# File 'lib/tape/adapters/action_mailer/maildir.rb', line 18 def all @maildir.list(:new).collect(&:data) end |
#last ⇒ Object
22 23 24 25 |
# File 'lib/tape/adapters/action_mailer/maildir.rb', line 22 def last # FIXME: Sort by date all.last end |
#reset ⇒ Object
27 28 29 30 31 |
# File 'lib/tape/adapters/action_mailer/maildir.rb', line 27 def reset @maildir.list(:new).each do || .destroy end end |