C0 code coverage information
Generated on Sat Feb 02 17:44:28 +0100 2008 with rcov 0.8.1.2
Code reported as executed by Ruby looks like this...
and this: this line is also marked as covered.
Lines considered as run by rcov, but not reported by Ruby, look like this,
and this: these lines were inferred by rcov (using simple heuristics).
Finally, here's a line marked as not executed.
1 # Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
2 # All files in this distribution are subject to the terms of the Ruby license.
3
4 # Extensions for Kernel
5
6 module Kernel
7
8 # Require all .rb and .so files on the given globs, utilizes Dir::[].
9 #
10 # Examples:
11 # # Given following directory structure:
12 # # src/foo.rb
13 # # src/bar.so
14 # # src/foo.yaml
15 # # src/foobar/baz.rb
16 # # src/foobar/README
17 #
18 # # requires all files in 'src':
19 # acquire 'src/*'
20 #
21 # # requires all files in 'src' recursive:
22 # acquire 'src/**/*'
23 #
24 # # require 'src/foo.rb' and 'src/bar.so' and 'src/foobar/baz.rb'
25 # acquire 'src/*', 'src/foobar/*'
26
27 def acquire *globs
28 globs.flatten.each do |glob|
29 Dir[glob].each do |file|
30 require file if file =~ /\.(rb|so)$/
31 end
32 end
33 end
34
35 def aquire *globs
36 warn "Kernel#aquire is being deprecated, use Kernel#acquire instead"
37 acquire *globs
38 end
39 end
Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.