Skip to content

Instantly share code, notes, and snippets.

@alexferreira
Created May 5, 2011 19:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexferreira/957755 to your computer and use it in GitHub Desktop.
Save alexferreira/957755 to your computer and use it in GitHub Desktop.
filenames = Dir.glob(Rails.application.paths.app.models.collect { |path| File.join(path, "**/*.rb") })
$class_names = []
filenames.each do |filename|
$class_names += File.read(filename).scan(/class ([\w\d_\-:]+)/).flatten
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment