diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-15 21:06:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-15 21:06:24 +0300 |
commit | eca3cd3a9e7d9ea680086cad8150050ec8cdef3f (patch) | |
tree | c3d262e0d8e721fc138c2d617f501fb09876f1b6 /lib/gitlab/sourcegraph.rb | |
parent | 6e81d7f6283fae1b22f66b9d9b133243921cbd9e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/sourcegraph.rb')
-rw-r--r-- | lib/gitlab/sourcegraph.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/gitlab/sourcegraph.rb b/lib/gitlab/sourcegraph.rb new file mode 100644 index 00000000000..d0f12c8364a --- /dev/null +++ b/lib/gitlab/sourcegraph.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module Gitlab + class Sourcegraph + class << self + def feature_conditional? + feature.conditional? + end + + def feature_available? + # The sourcegraph_bundle feature could be conditionally applied, so check if `!off?` + !feature.off? + end + + def feature_enabled?(thing = nil) + feature.enabled?(thing) + end + + private + + def feature + Feature.get(:sourcegraph) + end + end + end +end |