Class: Search::SnippetService

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

Instance Attribute Summary

Attributes inherited from GlobalService

#current_user, #params

Instance Method Summary collapse

Methods inherited from GlobalService

#allowed_scopes, #initialize, #projects

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

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