Commit 61ff24eb authored by Marius Rackwitz's avatar Marius Rackwitz

[Refactor] Use group_by instead

Thanks @segiddins.
parent 34b03320
......@@ -236,10 +236,7 @@ module Pod
# @return [Array<PodTarget>]
#
def generate_pod_targets(target, specs)
grouped_specs = specs.map do |spec|
specs.select { |s| s.root == spec.root }
end.uniq
grouped_specs = specs.group_by(&:root).values.uniq
grouped_specs.map do |pod_specs|
generate_pod_target(target, pod_specs)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment