Skip to content

Instantly share code, notes, and snippets.

@sameera207
Created March 24, 2014 06:26
Show Gist options
  • Save sameera207/9735146 to your computer and use it in GitHub Desktop.
Save sameera207/9735146 to your computer and use it in GitHub Desktop.
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