BigW Consortium Gitlab

base_handler.rb 465 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
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

12
        def can_execute?
13 14 15
          raise NotImplementedError
        end

16
        def execute
17 18
          raise NotImplementedError
        end
19 20 21 22

        def metrics_params
          { handler: self.class.name }
        end
23 24 25 26
      end
    end
  end
end