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 # from http://whytheluckystiff.net/articles/seeingMetaclassesClearly.html
2
3 class Object
4 # The hidden singleton lurks behind everyone
5 def metaclass; class << self; self; end; end
6 def meta_eval &blk; metaclass.instance_eval &blk; end
7
8 # Adds methods to a metaclass
9 def meta_def name, &blk
10 meta_eval { define_method name, &blk }
11 end
12
13 # Defines an instance method within a class
14 def class_def name, &blk
15 class_eval { define_method name, &blk }
16 end
17 end
Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.