2014-09-02 18:07:02 +05:30
|
|
|
module Search
|
|
|
|
class ProjectService
|
|
|
|
attr_accessor :project, :current_user, :params
|
|
|
|
|
|
|
|
def initialize(project, user, params)
|
|
|
|
@project, @current_user, @params = project, user, params.dup
|
|
|
|
end
|
|
|
|
|
|
|
|
def execute
|
2015-04-26 12:48:37 +05:30
|
|
|
Gitlab::ProjectSearchResults.new(project.id,
|
|
|
|
params[:search],
|
|
|
|
params[:repository_ref])
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|