Created
June 19, 2018 20:53
-
-
Save GPrimola/086683bd53d204706e23efdb1cc75291 to your computer and use it in GitHub Desktop.
Class usage in a Ruby 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
| 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 | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment