Sha256: 664d063be977a8e6eb7feeeab59891644d8860d35599157d08f5f8b98297d215
Contents?: true
Size: 545 Bytes
Versions: 41
Compression:
Stored size: 545 Bytes
Contents
# frozen_string_literal: true class MiniDefender::Rules::ExcludedWith < MiniDefender::Rule def initialize(target) raise ArgumentError, 'Target must be a string' unless target.is_a?(String) @target = target end def self.signature 'excluded_with' end def self.make(args) raise ArgumentError, 'Target and expected value are required.' unless args.length == 1 self.new(args[0]) end def excluded?(validator) validator.data.key?(@target) end def passes?(attribute, value, validator) true end end
Version data entries
41 entries across 41 versions & 1 rubygems