1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
module ActionMailbox module Routing extend ActiveSupport::Concern class_methods do attr_reader :router def routing(routes) (@router ||= ActionMailbox::Router.new).add_routes(routes) end def route(inbound_email) @router.route(inbound_email) end end end end