debian-mirror-gitlab/config/initializers/0_inject_enterprise_edition_module.rb
2019-10-12 21:52:04 +05:30

19 lines
407 B
Ruby

# 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)