summaryrefslogtreecommitdiff
path: root/lib/gitlab/email/handler/base_handler.rb
blob: 0bba433d04bfba6d726df2cb3fd0e2a11cc174f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module Gitlab
  module Email
    module Handler
      class BaseHandler
        attr_reader :mail, :mail_key

        def initialize(mail, mail_key)
          @mail = mail
          @mail_key = mail_key
        end

        def can_execute?
          raise NotImplementedError
        end

        def execute
          raise NotImplementedError
        end

        def metrics_params
          { handler: self.class.name }
        end
      end
    end
  end
end