Published in: Ruby
Requires all Ruby source files in a given directory.
class Dir def self.require_all(directory) self.entries(directory).each do |file| if file =~ /\.rb/ require directory + file end end end end
You need to login to post a comment.
Beginning Ruby: From Novice to Professional
Beginning Ruby is a thoroughly contemporary guide for every type of reader wanting to learn Ruby, from novice programmers to web developers to Ruby newcomers. It starts by explaining the principles behind object-oriented programming and within a few chapters builds toward creating a genuine Ruby application.
jccovey on 06/20/08
Published in: Ruby
Requires all Ruby source files in a given directory.
class Dir def self.require_all(directory) self.entries(directory).each do |file| if file =~ /\.rb/ require directory + file end end end end
You need to login to post a comment.