Module: Kernel

Defined in:
lib/Context/require_all.rb

Instance Method Summary collapse

Instance Method Details

#require_all(glob) ⇒ Object

Requires all the files that match the glob in the current load-path



5
6
7
8
9
10
11
12
# File 'lib/Context/require_all.rb', line 5

def require_all(glob)
	$:.each do |path|
		Dir.glob(path + "/" + glob) do |file|
			name = file.to_s.sub(path + "/", "")
			require name
		end
	end
end