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 ...@@ -236,10 +236,7 @@ module Pod
# @return [Array<PodTarget>] # @return [Array<PodTarget>]
# #
def generate_pod_targets(target, specs) def generate_pod_targets(target, specs)
grouped_specs = specs.map do |spec| grouped_specs = specs.group_by(&:root).values.uniq
specs.select { |s| s.root == spec.root }
end.uniq
grouped_specs.map do |pod_specs| grouped_specs.map do |pod_specs|
generate_pod_target(target, pod_specs) generate_pod_target(target, pod_specs)
end 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