| Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
|---|---|---|---|---|
| lib/dagnabit/link/configuration.rb | 40 | 28 | 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 # Dagnabit::Edge::Configuration - dag edge configuration |
5 # |
6 module Configuration |
7 attr_accessor :ancestor_id_column |
8 attr_accessor :descendant_id_column |
9 attr_writer :transitive_closure_table_name |
10 attr_accessor :transitive_closure_class_name |
11 |
12 # |
13 # Configure an ActiveRecord model as a dag link. See Dagnabit::Activation |
14 # for options description. |
15 # |
16 def configure_acts_as_dag_link(options) |
17 self.ancestor_id_column = options[:ancestor_id_column] || 'ancestor_id' |
18 self.descendant_id_column = options[:descendant_id_column] || 'descendant_id' |
19 self.transitive_closure_table_name = options[:transitive_closure_table_name] || table_name + '_transitive_closure_tuples' |
20 self.transitive_closure_class_name = options[:transitive_closure_class_name] || 'TransitiveClosureLink' |
21 end |
22 |
23 def transitive_closure_table_name |
24 connection.quote_table_name(unquoted_transitive_closure_table_name) |
25 end |
26 |
27 def unquoted_transitive_closure_table_name |
28 @transitive_closure_table_name |
29 end |
30 |
31 def ancestor_type_column |
32 'ancestor_type' |
33 end |
34 |
35 def descendant_type_column |
36 'descendant_type' |
37 end |
38 end |
39 end |
40 end |
Generated on Tue Dec 08 04:06:14 -0600 2009 with rcov 0.9.6