Class: AhoyEmail::Processor
- Inherits:
-
Object
- Object
- AhoyEmail::Processor
- Defined in:
- lib/ahoy_email/processor.rb
Constant Summary collapse
- UTM_PARAMETERS =
%w(utm_source utm_medium utm_term utm_content utm_campaign)
Instance Attribute Summary collapse
-
#mailer ⇒ Object
readonly
Returns the value of attribute mailer.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(mailer, options) ⇒ Processor
constructor
A new instance of Processor.
- #perform ⇒ Object
Constructor Details
#initialize(mailer, options) ⇒ Processor
Returns a new instance of Processor.
7 8 9 10 11 12 13 |
# File 'lib/ahoy_email/processor.rb', line 7 def initialize(mailer, ) @mailer = mailer @options = unknown_keywords = .keys - AhoyEmail..keys raise ArgumentError, "unknown keywords: #{unknown_keywords.join(", ")}" if unknown_keywords.any? end |
Instance Attribute Details
#mailer ⇒ Object (readonly)
Returns the value of attribute mailer.
3 4 5 |
# File 'lib/ahoy_email/processor.rb', line 3 def mailer @mailer end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/ahoy_email/processor.rb', line 3 def @options end |
Instance Method Details
#perform ⇒ Object
15 16 17 18 19 |
# File 'lib/ahoy_email/processor.rb', line 15 def perform track_links if [:utm_params] || [:click] if [:message] . = end |