aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-09-20 17:27:41 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-09-20 17:27:41 -0700
commit43bd726442590125d3d07563822790a8fd9827d2 (patch)
tree0218978eab728c040f0b2d68e4dd040f72a17850 /lib
parent3fc8e5325fe5d9b53e60ce422f3b29ce5a774142 (diff)
downloadrails-43bd726442590125d3d07563822790a8fd9827d2.tar.gz
rails-43bd726442590125d3d07563822790a8fd9827d2.tar.bz2
rails-43bd726442590125d3d07563822790a8fd9827d2.zip
Stick with match concept
Diffstat (limited to 'lib')
-rw-r--r--lib/action_mailroom/router.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/action_mailroom/router.rb b/lib/action_mailroom/router.rb
index c3fa183438..fb0b638978 100644
--- a/lib/action_mailroom/router.rb
+++ b/lib/action_mailroom/router.rb
@@ -16,7 +16,7 @@ class ActionMailroom::Router
end
def route(inbound_email)
- if mailbox = locate_mailbox(inbound_email)
+ if mailbox = match_to_mailbox(inbound_email)
mailbox.receive(inbound_email)
else
raise RoutingError
@@ -26,7 +26,7 @@ class ActionMailroom::Router
private
attr_reader :routes
- def locate_mailbox(inbound_email)
+ def match_to_mailbox(inbound_email)
routes.detect { |route| route.match?(inbound_email) }.try(:mailbox_class)
end
end