blob: 8391bf9db0b13fb621b21e6eea0e031dbfe4960c (
plain) (
tree)
|
|
# frozen_string_literal: true
module ActionMailbox
# See +ActionMailbox::Base+ for how to specify routing.
module Routing
extend ActiveSupport::Concern
included do
cattr_accessor :router, default: ActionMailbox::Router.new
end
class_methods do
def routing(routes)
router.add_routes(routes)
end
def route(inbound_email)
router.route(inbound_email)
end
def mailbox_for(inbound_email)
router.mailbox_for(inbound_email)
end
end
end
end
|