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
|