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

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
2019-02-15 15:39:39 +05:30
attr_reader :args
2018-11-08 19:23:39 +05:30
2019-02-15 15:39:39 +05:30
def initialize(*args)
@args = args
2018-11-08 19:23:39 +05:30
end
def matches?(_request)
2019-02-15 15:39:39 +05:30
Feature.enabled?(*args)
2018-11-08 19:23:39 +05:30
end
end
end