ADD protected branch Features

This commit is contained in:
Jasder
2020-12-03 15:24:40 +08:00
parent a24f0f8b45
commit 6a8ae5234b
40 changed files with 1252 additions and 11 deletions

View File

@@ -0,0 +1,44 @@
module Repositories::ProtectedBranches
class DeleteInteractor
def self.call(user, identifier, filepath, **args)
interactor = new(user, identifier, filepath, **args)
interactor.run
interactor
end
attr_reader :error, :result
def initialize(user, identifier, filepath, **args)
@user = user
@identifier = identifier
@filepath = filepath
@args = args
end
def success?
@error.nil?
end
def result
end
def run
rescue Exception => exception
fail!(exception.message)
end
private
attr_reader :user, :identifier, :filepath, :args
def fail!(error)
@error = error
end
def render_result(response)
@result = response
end
end
end