Class: Gitlab::Sourcegraph
- Inherits:
-
Object
- Object
- Gitlab::Sourcegraph
- Defined in:
- lib/gitlab/sourcegraph.rb
Class Method Summary collapse
- .feature_available? ⇒ Boolean
- .feature_conditional? ⇒ Boolean
- .feature_enabled?(actor = nil) ⇒ Boolean
Class Method Details
.feature_available? ⇒ Boolean
10 11 12 13 14 |
# File 'lib/gitlab/sourcegraph.rb', line 10 def feature_available? # The sourcegraph feature could be conditionally applied, so check if `!off?` # We also can't just check !off? because the ActiveRecord might not exist yet self.feature_enabled? || !feature.off? end |
.feature_conditional? ⇒ Boolean
6 7 8 |
# File 'lib/gitlab/sourcegraph.rb', line 6 def feature_conditional? feature.conditional? end |