in app/components/primer/component.rb [52:77]
def check_denylist(denylist = [], **arguments)
if should_raise_error?
unpacked_denylist =
denylist.each_with_object({}) do |(keys, value), memo|
keys.each { |key| memo[key] = value }
end
violations = unpacked_denylist.keys & arguments.keys
if violations.any?
message = "Found #{violations.count} #{'violation'.pluralize(violations)}:"
violations.each do |violation|
message += "\n The #{violation} argument is not allowed here. #{unpacked_denylist[violation]}"
end
raise(ArgumentError, message)
end
end
arguments
end