Created
April 19, 2012 16:24
-
-
Save dkoprov/2422108 to your computer and use it in GitHub Desktop.
Counts usages of the classes in the project
This file contains hidden or 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
| # stolen from the destroyallsoftware screencast | |
| find app lib -iname '*.rb' | xargs grep -h '^[[:space:]]*class\|module\b' | sed 's/^[[:space:]]*//' | cut -d ' ' -f 2 | while read class; do echo `grep -rl "\b$class\b" app lib --include '*.rb' | wc -l` $class ; done | sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment