Skip to content

Instantly share code, notes, and snippets.

@gearnode
Last active August 29, 2015 14:24
Show Gist options
  • Save gearnode/d404e9e1201ddf907f83 to your computer and use it in GitHub Desktop.
Save gearnode/d404e9e1201ddf907f83 to your computer and use it in GitHub Desktop.
require all ruby files in one directory
# Require all
def require_all path
global = File.join(File.dirname(__FILE__), path, '*.rb')
Dir[global].each do |file|
require file
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment