3 ms·
items .select(&:is_the_best) .flat_map { |i| i.sub_item.map(&:value) } Not having functional constructs really hurts readability, and I don't want
by ulucs 6y ago
items
.select(&:is_the_best)
.flat_map { |i| i.sub_item.map(&:value) }
Not having functional constructs really hurts readability, and I don't want to think about what would happen to the list comprehension with more complicated logic