Class: Mailscope::DeliveryMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/mailscope/delivery_method.rb

Overview

ActionMailer delivery method. Unlike letter_opener it stores the raw message plus a small metadata index, and never shells out to a browser.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings = {}) ⇒ DeliveryMethod

Returns a new instance of DeliveryMethod.



9
10
11
# File 'lib/mailscope/delivery_method.rb', line 9

def initialize(settings = {})
  self.settings = settings
end

Instance Attribute Details

#settingsObject

Returns the value of attribute settings.



7
8
9
# File 'lib/mailscope/delivery_method.rb', line 7

def settings
  @settings
end

Instance Method Details

#deliver!(mail) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/mailscope/delivery_method.rb', line 13

def deliver!(mail)
  validate!(mail)

  id = storage.store(mail)
  prune
  id
end