Skip to content

Commit

Permalink
[API] Generator: Rubocop styling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed Sep 2, 2024
1 parent 11a4037 commit e46b0d9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions elasticsearch-api/utils/thor/endpoint_specifics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e46b0d9

Please sign in to comment.