2018-12-13 13:39:08 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
module Constraints
|
|
|
|
class FeatureConstrainer
|
2018-12-23 12:14:25 +05:30
|
|
|
attr_reader :args
|
2018-11-08 19:23:39 +05:30
|
|
|
|
2018-12-23 12:14:25 +05:30
|
|
|
def initialize(*args)
|
|
|
|
@args = args
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def matches?(_request)
|
2018-12-23 12:14:25 +05:30
|
|
|
Feature.enabled?(*args)
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|