Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
lib/fumoffu/utils/component_search.rb | 23 | 21 | 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 Fumoffu |
2 module Utils |
3 module ComponentSearch |
4 def component_by_name component, target |
5 name = component.getName |
6 return component unless name.nil? or name != target |
7 |
8 if component.getParent then |
9 component_by_name(component.getParent, target) |
10 else |
11 return nil |
12 end |
13 end |
14 |
15 def component_child_by_name component, target |
16 component.getComponents.each do |child_component| |
17 return child_component unless child_component.getName != target |
18 end |
19 return nil |
20 end |
21 end |
22 end |
23 end |
Generated on Tue Apr 19 07:59:25 +0200 2011 with rcov 0.9.8