class ActionMailbox::Router

def match_to_mailbox(inbound_email)

def match_to_mailbox(inbound_email)
  routes.detect { |route| route.match?(inbound_email) }.try(:mailbox_class)
end