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