Class: Gitlab::Triage::GraphqlQueries::QueryParamBuilders::LabelsParamBuilder

Inherits:
BaseParamBuilder
  • Object
show all
Defined in:
lib/gitlab/triage/graphql_queries/query_param_builders/labels_param_builder.rb

Instance Attribute Summary

Attributes inherited from BaseParamBuilder

#negated, #param_contents, #param_name, #with_quotes

Instance Method Summary collapse

Methods inherited from BaseParamBuilder

#build_param

Constructor Details

#initialize(param_name, labels, negated: false) ⇒ LabelsParamBuilder

Returns a new instance of LabelsParamBuilder.



9
10
11
12
13
# File 'lib/gitlab/triage/graphql_queries/query_param_builders/labels_param_builder.rb', line 9

def initialize(param_name, labels, negated: false)
  label_param_content = labels.map { |label| Utils.graphql_quote(label) }.join(', ').then { |content| "[#{content}]" }

  super(param_name, label_param_content, with_quotes: false, negated: negated)
end