summaryrefslogtreecommitdiff
path: root/lib/constraints
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-12-14 14:27:26 +0100
committerBob Van Landuyt <bob@vanlanduyt.co>2018-12-14 14:35:05 +0100
commit2e8d0153cd6bed87fa55255ef11fda7152b2bcaf (patch)
tree4a6718e41521154cf9f9a85d60794d5e8336a77d /lib/constraints
parent744f6ed12bf1ce543b4c903d27cfd8362e91795d (diff)
downloadgitlab-ce-2e8d0153cd6bed87fa55255ef11fda7152b2bcaf.tar.gz
Pass on arguments passed to the FeatureConstrainer
All arguments passed to the `FeatureConstrainer` will be passed on to the `Feature.enabled?` check.
Diffstat (limited to 'lib/constraints')
-rw-r--r--lib/constraints/feature_constrainer.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/constraints/feature_constrainer.rb b/lib/constraints/feature_constrainer.rb
index 5f8d97c8cdc..cd246cf37a4 100644
--- a/lib/constraints/feature_constrainer.rb
+++ b/lib/constraints/feature_constrainer.rb
@@ -2,14 +2,14 @@
module Constraints
class FeatureConstrainer
- attr_reader :feature, :thing, :default_enabled
+ attr_reader :args
- def initialize(feature, thing, default_enabled)
- @feature, @thing, @default_enabled = feature, thing, default_enabled
+ def initialize(*args)
+ @args = args
end
def matches?(_request)
- Feature.enabled?(feature, @thing, default_enabled: true)
+ Feature.enabled?(*args)
end
end
end