Class: LetterStampMailDelivery::DeliveryMethod
- Inherits:
-
Mail::TestMailer
- Object
- Mail::TestMailer
- LetterStampMailDelivery::DeliveryMethod
- Defined in:
- lib/letter_stamp_mail_delivery/delivery_method.rb
Class Attribute Summary collapse
-
.posting_location ⇒ Object
Returns the value of attribute posting_location.
Class Method Summary collapse
Instance Method Summary collapse
- #deliver!(mail) ⇒ Object
-
#initialize(settings) ⇒ DeliveryMethod
constructor
A new instance of DeliveryMethod.
Constructor Details
#initialize(settings) ⇒ DeliveryMethod
Returns a new instance of DeliveryMethod.
26 27 28 29 30 31 |
# File 'lib/letter_stamp_mail_delivery/delivery_method.rb', line 26 def initialize(settings) super self.settings = { :delivery_location => "#{tmpdir}/letter_stamp_mails", }.update(settings) end |
Class Attribute Details
.posting_location ⇒ Object
Returns the value of attribute posting_location.
8 9 10 |
# File 'lib/letter_stamp_mail_delivery/delivery_method.rb', line 8 def posting_location @posting_location end |
Class Method Details
.increment_mail_count ⇒ Object
20 21 22 |
# File 'lib/letter_stamp_mail_delivery/delivery_method.rb', line 20 def increment_mail_count @mail_counts[posting_location] += 1 end |
.mail_count ⇒ Object
15 16 17 |
# File 'lib/letter_stamp_mail_delivery/delivery_method.rb', line 15 def self.mail_count @mail_counts[posting_location] end |
.start ⇒ Object
11 12 13 |
# File 'lib/letter_stamp_mail_delivery/delivery_method.rb', line 11 def self.start @mail_counts = Hash.new(0) end |
Instance Method Details
#deliver!(mail) ⇒ Object
33 34 35 36 |
# File 'lib/letter_stamp_mail_delivery/delivery_method.rb', line 33 def deliver!(mail) super save_raw_mail(mail.encoded) end |