2016-05-21 12:40:08 -04:00
|
|
|
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
|
|
|
|
|
2016-10-12 13:07:36 -04:00
|
|
|
def can_execute?
|
2016-05-21 12:40:08 -04:00
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2016-10-12 13:07:36 -04:00
|
|
|
def execute
|
2016-05-21 12:40:08 -04:00
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2017-04-21 11:11:21 -04:00
|
|
|
|
|
|
|
def metrics_params
|
|
|
|
{ handler: self.class.name }
|
|
|
|
end
|
2016-05-21 12:40:08 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|