Sha256: d4ab61e4388eac1a45e77395c9d77507861351e3bd876f7907349d3e48dcb9c1
Contents?: true
Size: 521 Bytes
Versions: 27
Compression:
Stored size: 521 Bytes
Contents
require_relative 'params_validator' module Gitlab module Triage class LimiterValidator < ParamsValidator private def params_limiter_names @parameter_definitions.map do |param| param[:name] end end def validate_required_parameters(value) raise ArgumentError, "For the limits field, please specify one of: `#{params_limiter_names.join('`, `')}`" unless value.keys.map(&:to_sym).one? { |key| params_limiter_names.include?(key) } end end end end
Version data entries
27 entries across 27 versions & 1 rubygems