debian-mirror-gitlab/lib/gitlab/email/handler/base_handler.rb

29 lines
496 B
Ruby
Raw Normal View History

2018-11-20 20:47:30 +05:30
# frozen_string_literal: true
2016-09-13 17:45:13 +05:30
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
2017-08-17 22:00:37 +05:30
def can_execute?
2016-09-13 17:45:13 +05:30
raise NotImplementedError
end
2017-08-17 22:00:37 +05:30
def execute
2016-09-13 17:45:13 +05:30
raise NotImplementedError
end
2017-08-17 22:00:37 +05:30
def metrics_params
{ handler: self.class.name }
2016-09-13 17:45:13 +05:30
end
end
end
end
end