Module: Caffeinate::Dripper::Delivery::ClassMethods
- Defined in:
- lib/caffeinate/dripper/delivery.rb
Instance Method Summary collapse
-
#deliver!(mailing) ⇒ Object
Delivers the given Caffeinate::Mailing.
Instance Method Details
#deliver!(mailing) ⇒ Object
Delivers the given Caffeinate::Mailing
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/caffeinate/dripper/delivery.rb', line 16 def deliver!(mailing) = if mailing.drip.parameterized? mailing.mailer_class.constantize.with(mailing: mailing).send(mailing.mailer_action) else mailing.mailer_class.constantize.send(mailing.mailer_action, mailing) end .caffeinate_mailing = mailing if ::Caffeinate.config.deliver_later? .deliver_later else .deliver end end |