Skip to content

Commit

Permalink
Merge pull request #51 from d-m-u/cleanup_the_array_sanitize_thing
Browse files Browse the repository at this point in the history
minor cleanup of the sanitize_associative_array method
  • Loading branch information
chessbyte authored Aug 13, 2020
2 parents 18a3731 + 3d8cb82 commit f5538f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/awesome_spawn/command_line_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ def sanitize(params)
end

def sanitize_associative_array(assoc_array)
assoc_array.each.with_object([]) do |item, array|
array.concat(sanitize_item(item))
end
assoc_array.flat_map { |item| sanitize_item(item) }
end

def sanitize_item(item)
Expand Down

0 comments on commit f5538f6

Please sign in to comment.