/ Published in: Ruby

Requires all Ruby source files in a given directory.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
class Dir def self.require_all(directory) self.entries(directory).each do |file| if file =~ /\.rb/ require directory + file end end end end
Comments
