Welcome to mirror list, hosted at ThFree Co, Russian Federation.

0_inject_enterprise_edition_module.rb « initializers « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 39595e23abec5f2fbb059d4fdce5e0fd044a4a59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'active_support/inflector'

module InjectEnterpriseEditionModule
  def prepend_if_ee(constant)
    prepend(constant.constantize) if Gitlab.ee?
  end

  def extend_if_ee(constant)
    extend(constant.constantize) if Gitlab.ee?
  end

  def include_if_ee(constant)
    include(constant.constantize) if Gitlab.ee?
  end
end

Module.prepend(InjectEnterpriseEditionModule)