gitlab-org--gitlab-foss/app/services/base_service.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
739 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# This is the original root class for service related classes,
# and due to historical reason takes a project as scope.
# Later separate base classes for different scopes will be created,
# and existing service will use these one by one.
# After all are migrated, we can remove this class.
#
# For new services, please see https://docs.gitlab.com/ee/development/reusing_abstractions.html#service-classes
class BaseService
include BaseServiceUtility
include Gitlab::Experiment::Dsl
attr_accessor :project, :current_user, :params
def initialize(project, user = nil, params = {})
@project = project
@current_user = user
@params = params.dup
end
2012-07-27 20:35:24 -04:00
2017-02-22 12:51:46 -05:00
delegate :repository, to: :project
end