1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Partly revert calculate_statistics change

`@pairs` is an array of arrays, not a hash.
This commit is contained in:
Ryuta Kamizono 2020-01-27 13:14:33 +09:00
parent df81f2e5f5
commit 104c184388

View file

@ -35,7 +35,7 @@ class CodeStatistics #:nodoc:
private private
def calculate_statistics def calculate_statistics
@pairs.transform_values { |dir| calculate_directory_statistics(dir) } Hash[@pairs.map { |pair| [pair.first, calculate_directory_statistics(pair.last)] }]
end end
def calculate_directory_statistics(directory, pattern = /^(?!\.).*?\.(rb|js|coffee|rake)$/) def calculate_directory_statistics(directory, pattern = /^(?!\.).*?\.(rb|js|coffee|rake)$/)