Class: Search::SnippetService

Inherits:
GlobalService show all
Defined in:
app/services/search/snippet_service.rb

Constant Summary

Constants inherited from GlobalService

GlobalService::ALLOWED_SCOPES, GlobalService::DEFAULT_SCOPE

Instance Attribute Summary

Attributes inherited from GlobalService

#current_user, #params

Instance Method Summary collapse

Methods inherited from GlobalService

#allowed_scopes, #initialize, #projects

Constructor Details

This class inherits a constructor from Search::GlobalService

Instance Method Details

#executeObject



5
6
7
# File 'app/services/search/snippet_service.rb', line 5

def execute
  Gitlab::SnippetSearchResults.new(current_user, params[:search])
end

#scopeObject



9
10
11
# File 'app/services/search/snippet_service.rb', line 9

def scope
  @scope ||= 'snippet_titles'
end