Module: AhoyEmail::Mailer
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/ahoy_email/mailer.rb
Instance Method Summary collapse
Instance Method Details
#ahoy_options ⇒ Object
42 43 44 |
# File 'lib/ahoy_email/mailer.rb', line 42 def ||= AhoyEmail. end |
#call_ahoy_options(options, key) ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/ahoy_email/mailer.rb', line 59 def (, key) v = [key] [key] = v.respond_to?(:call) ? instance_exec(&v) : v # only call other options if needed if [key] AhoyEmail::Utils::OPTION_KEYS[key].each do |k| v = [k] [k] = v.respond_to?(:call) ? instance_exec(&v) : v end end end |
#save_ahoy_options ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/ahoy_email/mailer.rb', line 46 def Safely.safely do = {} (, :message) (, :utm_params) (, :click) if [:message] || [:utm_params] || [:click] AhoyEmail::Processor.new(self, ).perform end end end |