Sha256: 9d7175b92a0e8aa156431277ed9d0abdf574a4538c4ed920620c5d3371cb4ca8

Contents?: true

Size: 529 Bytes

Versions: 51

Compression:

Stored size: 529 Bytes

Contents

# 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

Version data entries

51 entries across 49 versions & 4 rubygems

Version Path
actionmailbox-6.1.7.10 lib/action_mailbox/routing.rb
actionmailbox-6.1.7.9 lib/action_mailbox/routing.rb
actionmailbox-6.1.7.8 lib/action_mailbox/routing.rb
actionmailbox-6.1.7.7 lib/action_mailbox/routing.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionmailbox-6.1.6.1/lib/action_mailbox/routing.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionmailbox-7.0.2.3/lib/action_mailbox/routing.rb
actionmailbox-6.1.7.6 lib/action_mailbox/routing.rb
actionmailbox-6.1.7.5 lib/action_mailbox/routing.rb
actionmailbox-6.1.7.4 lib/action_mailbox/routing.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionmailbox-7.0.2.3/lib/action_mailbox/routing.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionmailbox-6.1.6.1/lib/action_mailbox/routing.rb
actionmailbox-6.1.7.3 lib/action_mailbox/routing.rb
actionmailbox-6.1.7.2 lib/action_mailbox/routing.rb
actionmailbox-6.1.7.1 lib/action_mailbox/routing.rb
actionmailbox-6.1.7 lib/action_mailbox/routing.rb
actionmailbox-6.1.6.1 lib/action_mailbox/routing.rb
actionmailbox-6.1.6 lib/action_mailbox/routing.rb
actionmailbox-7.0.2.4 lib/action_mailbox/routing.rb
actionmailbox-6.1.5.1 lib/action_mailbox/routing.rb
actionmailbox-6.1.5 lib/action_mailbox/routing.rb