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

16 lines
242 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-01-03 12:48:30 +05:30
attr_reader :feature
2018-11-08 19:23:39 +05:30
2019-01-03 12:48:30 +05:30
def initialize(feature)
@feature = feature
2018-11-08 19:23:39 +05:30
end
def matches?(_request)
2019-01-03 12:48:30 +05:30
Feature.enabled?(feature)
2018-11-08 19:23:39 +05:30
end
end
end