gitlab-org--gitlab-foss/lib/gitlab/email/handler.rb
tiagonbotelho 011e561bfa implements reset incoming email token on issues modal and account page,
reactivates all tests and writes more tests for it
2016-11-07 15:56:18 +00:00

17 lines
411 B
Ruby

require 'gitlab/email/handler/create_note_handler'
require 'gitlab/email/handler/create_issue_handler'
module Gitlab
module Email
module Handler
HANDLERS = [CreateNoteHandler, CreateIssueHandler]
def self.for(mail, mail_key)
HANDLERS.find do |klass|
handler = klass.new(mail, mail_key)
break handler if handler.can_handle?
end
end
end
end
end