Skip to content

Instantly share code, notes, and snippets.

View Pauloparakleto's full-sized avatar

Paulo Felipe Souza Pauloparakleto

View GitHub Profile
#recursively require all files in directory (and subdirectories)
Dir["#{File.dirname(__FILE__)}/squat/**/*.rb"].each {|file| require file }
#recursively require all files in directory but skip paths that match a pattern
Dir["#{File.dirname(__FILE__)}/squat/**/*.rb"].each do |file|
require file unless file =~ /\/model\//
end