mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
276 B
11 lines
276 B
11 years ago
|
module Docs
|
||
|
module AutoloadHelper
|
||
|
def autoload_all(path, suffix = '')
|
||
|
Dir["#{Docs.root_path}/#{path}/**/*.rb"].each do |file|
|
||
|
name = File.basename(file, '.rb') + (suffix ? "_#{suffix}" : '')
|
||
|
autoload name.camelize, file
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|