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