class Plug::Constraint

Public Class Methods

new(feature) click to toggle source
# File lib/plug/constraint.rb, line 5
def initialize(feature)
  @feature = feature
end

Public Instance Methods

matches?(_request) click to toggle source
# File lib/plug/constraint.rb, line 9
def matches?(_request)
  Plug.enabled?(@feature)
rescue StandardError
  true
end