debian-mirror-gitlab/lib/constraints/feature_constrainer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
229 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2018-11-08 19:23:39 +05:30
module Constraints
class FeatureConstrainer
2018-12-23 12:14:25 +05:30
attr_reader :args
2018-11-08 19:23:39 +05:30
2018-12-23 12:14:25 +05:30
def initialize(*args)
@args = args
2018-11-08 19:23:39 +05:30
end
def matches?(_request)
2018-12-23 12:14:25 +05:30
Feature.enabled?(*args)
2018-11-08 19:23:39 +05:30
end
end
end