Sha256: ac78bc1d95d0c241710a3085c2f09bf4a5aa525642f8b26f657a0c3a325e0f17

Contents?: true

Size: 777 Bytes

Versions: 27

Compression:

Stored size: 777 Bytes

Contents

require_relative 'base_query_param_builder'

module Gitlab
  module Triage
    module APIQueryBuilders
      class MultiQueryParamBuilder < BaseQueryParamBuilder
        attr_reader :separator

        def initialize(param_name, param_contents, separator, allowed_values: nil)
          @separator = separator
          super(param_name, Array(param_contents), allowed_values: allowed_values)
        end

        def param_content
          param_contents.map(&:strip).join(separator)
        end

        private

        def validate_allowed_values!
          param_contents.each do |param|
            ParamsValidator.new([{ name: param_name, type: String, values: allowed_values }], { param_name => param }).validate!
          end
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
gitlab-triage-1.42.2 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.42.1 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.42.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.41.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.40.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.30.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.29.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
payping-gitlab-triage-0.1.3 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
payping-gitlab-triage-0.1.2 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
payping-gitlab-triage-0.1.1 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.28.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.27.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.26.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.25.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.24.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.23.1 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.23.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.22.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.21.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb
gitlab-triage-1.20.0 lib/gitlab/triage/api_query_builders/multi_query_param_builder.rb