Class: AhoyEmail::Tracker
- Inherits:
-
Object
- Object
- AhoyEmail::Tracker
- Defined in:
- lib/ahoy_email/tracker.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message) ⇒ Tracker
constructor
A new instance of Tracker.
- #perform ⇒ Object
Constructor Details
#initialize(message) ⇒ Tracker
Returns a new instance of Tracker.
5 6 7 |
# File 'lib/ahoy_email/tracker.rb', line 5 def initialize() @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/ahoy_email/tracker.rb', line 3 def @message end |
Instance Method Details
#perform ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ahoy_email/tracker.rb', line 9 def perform Safely.safely do # perform_deliveries check still needed in observer if .perform_deliveries if .ahoy_data data = .ahoy_data.merge(message: ) . = AhoyEmail.track_method.call(data) end if . && .[:click] Utils.publish(:send, ..slice(:campaign)) end end end end |