From e46b0d95666948a460ae08ccd7b5b051f31b19d8 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 2 Sep 2024 09:03:41 +0100 Subject: [PATCH] [API] Generator: Rubocop styling changes --- elasticsearch-api/utils/thor/endpoint_specifics.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/utils/thor/endpoint_specifics.rb b/elasticsearch-api/utils/thor/endpoint_specifics.rb index 0b3cc41547..5dc4d6fa65 100644 --- a/elasticsearch-api/utils/thor/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/endpoint_specifics.rb @@ -99,16 +99,14 @@ def msearch_body_helper <<~SRC case when body.is_a?(Array) && body.any? { |d| d.has_key? :search } - payload = body. - inject([]) do |sum, item| + payload = body.inject([]) do |sum, item| meta = item data = meta.delete(:search) sum << meta sum << data sum - end. - map { |item| Elasticsearch::API.serializer.dump(item) } + end.map { |item| Elasticsearch::API.serializer.dump(item) } payload << "" unless payload.empty? payload = payload.join("\\n") when body.is_a?(Array)