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