2018-10-06 23:10:08 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-23 07:55:14 +00:00
|
|
|
module Constraints
|
|
|
|
class FeatureConstrainer
|
|
|
|
attr_reader :feature
|
|
|
|
|
|
|
|
def initialize(feature)
|
|
|
|
@feature = feature
|
|
|
|
end
|
|
|
|
|
|
|
|
def matches?(_request)
|
|
|
|
Feature.enabled?(feature)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|