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:
parent
df81f2e5f5
commit
104c184388
1 changed files with 1 additions and 1 deletions
|
@ -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)$/)
|
||||||
|
|
Loading…
Reference in a new issue