Sha256: f89d9bf7a0ee62ed7dc0209b4df50311904cefda84ab13c2b52977b57b3cec18
Contents?: true
Size: 941 Bytes
Versions: 2
Compression:
Stored size: 941 Bytes
Contents
# frozen_string_literal: true require 'dry/container' require 'emailbutler/webhooks/mappers/sendgrid' require 'emailbutler/webhooks/mappers/smtp2go' require 'emailbutler/webhooks/mappers/resend' require 'emailbutler/webhooks/mappers/mailjet' require 'emailbutler/webhooks/receiver' module Emailbutler class Container extend Dry::Container::Mixin DEFAULT_OPTIONS = { memoize: true }.freeze class << self def register(key) super(key, DEFAULT_OPTIONS) end end # webhook mappers register(:sendgrid_mapper) { Emailbutler::Webhooks::Mappers::Sendgrid.new } register(:smtp2go_mapper) { Emailbutler::Webhooks::Mappers::Smtp2Go.new } register(:resend_mapper) { Emailbutler::Webhooks::Mappers::Resend.new } register(:mailjet_mapper) { Emailbutler::Webhooks::Mappers::Mailjet.new } # webhook receiver register(:webhooks_receiver) { Emailbutler::Webhooks::Receiver.new } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
emailbutler-0.8.4 | lib/emailbutler/container.rb |
emailbutler-0.8.3 | lib/emailbutler/container.rb |