aboutsummaryrefslogblamecommitdiffstats
path: root/lib/action_mailroom/mailbox/routing.rb
blob: 9f082c8aa5aa0a14a9b2e4be3d1f542b5ccc35c7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                 
module ActionMailroom::Mailbox::Routing
  extend ActiveSupport::Concern

  class_methods do
    attr_reader :router

    def routing(routes)
      (@router ||= ActionMailroom::Router.new).add_routes(routes)
    end

    def route(inbound_email)
      @router.route(inbound_email)
    end
  end
end