Created
March 24, 2014 06:26
-
-
Save sameera207/9735146 to your computer and use it in GitHub Desktop.
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
count = 0 | |
a = Dir.glob("/<rails app path>/app/models/**/*.rb") | |
a.each do |f| | |
file = File.new(f) | |
while (line = file.gets) | |
unless /def\s\w*/.match(line).nil? | |
p line | |
p f | |
count = count + 1 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment