| Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
|---|---|---|---|---|
| lib/dagnabit/link/associations.rb | 18 | 10 | 100.00%
|
100.00%
|
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 module Dagnabit |
2 module Link |
3 # |
4 # Adds associations useful for link classes. |
5 # |
6 # This module mixes in the following associations to link classes: |
7 # |
8 # * +ancestor+: the source of this link, or where this link begins |
9 # * +descendant+: the target of this link, or where this link ends |
10 # |
11 module Associations |
12 def self.extended(base) |
13 base.send(:belongs_to, :ancestor, :polymorphic => true, :foreign_key => base.ancestor_id_column) |
14 base.send(:belongs_to, :descendant, :polymorphic => true, :foreign_key => base.descendant_id_column) |
15 end |
16 end |
17 end |
18 end |
Generated on Tue Dec 08 04:06:14 -0600 2009 with rcov 0.9.6