Forked from p3t0r/five_longest_classes_in_java_codebase.rb
Created
March 22, 2010 11:43
-
-
Save zigzag/339996 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Dir.glob("**/*.java").map{|it| it.split('/').last[0..-6]}.map{|it| [it, it.length]}.sort{|a, b| b[1] <=> a[1]}[0..5] | |
# A bit short version: | |
Dir['**/*'].grep(/(\w*)\.java/){$1}.sort_by(&:length).reverse.first(5).map{|it| [it,it.length]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment