class Hertz::NotificationDeliverer
Public Class Methods
deliver(notification)
click to toggle source
# File lib/hertz/notification_deliverer.rb, line 6 def deliver(notification) couriers_for(notification).each do |courier| build_courier(courier).deliver_notification(notification) end end
Private Class Methods
build_courier(courier)
click to toggle source
# File lib/hertz/notification_deliverer.rb, line 18 def build_courier(courier) "Hertz::#{courier.to_s.camelcase}".constantize end
couriers_for(notification)
click to toggle source
# File lib/hertz/notification_deliverer.rb, line 14 def couriers_for(notification) (notification.class.couriers + Hertz.common_couriers).uniq end