Module: MultiMail::Sender::Base
Overview
Abstract class for outgoing email senders.
Instance Attribute Summary collapse
-
#settings ⇒ Object
Returns the value of attribute settings.
-
#tracking ⇒ Object
readonly
Returns the value of attribute tracking.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Object
Initializes an outgoing email sender.
Instance Attribute Details
#settings ⇒ Object
Returns the value of attribute settings.
11 12 13 |
# File 'lib/multi_mail/sender/base.rb', line 11 def settings @settings end |
#tracking ⇒ Object (readonly)
Returns the value of attribute tracking.
12 13 14 |
# File 'lib/multi_mail/sender/base.rb', line 12 def tracking @tracking end |
Class Method Details
Instance Method Details
#initialize(options = {}) ⇒ Object
Initializes an outgoing email sender.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/multi_mail/sender/base.rb', line 17 def initialize( = {}) @settings = {} .keys.each do |key| # based on Hash#symbolize_keys! from Rails settings[(key.to_sym rescue key) || key] = [key] end self.class.(settings, false) @tracking = settings.delete(:track) || {} end |