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

sourcegraph.rb « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d0f12c8364a0f4aca05bdba4917fda20259647bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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