module Postal::MailGem::ConfigExtension

Public Class Methods

included(base) click to toggle source
# File lib/postal/mail_gem/config_extension.rb, line 12
def self.included(base)
  base.class_eval do
    alias_method :lookup_delivery_method_without_postal, :lookup_delivery_method
    alias_method :lookup_delivery_method, :lookup_delivery_method_with_postal
  end
end
load() click to toggle source
# File lib/postal/mail_gem/config_extension.rb, line 8
def self.load
  Mail::Configuration.send :include, self
end

Public Instance Methods

lookup_delivery_method_with_postal(method) click to toggle source
# File lib/postal/mail_gem/config_extension.rb, line 19
def lookup_delivery_method_with_postal(method)
  if method == :postal
    DeliveryMethod
  else
    lookup_delivery_method_without_postal(method)
  end
end