Jldrill Git C0 Coverage Information - RCov

lib/jldrill/model/ItemStatus.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/jldrill/model/ItemStatus.rb 49 39
100.00%
100.00%

Key

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.

Coverage Details

1 
2 module JLDrill
3 
4     # A container to hold the status of each kind of drill for the item.
5     class ItemStatus
6         
7         attr_reader :statuses, :item
8 
9         def initialize(item)
10             @item = item
11             @statuses = {}
12         end
13 
14         def add(status)
15             @statuses[status.name] = status
16         end
17 
18         def assign(itemStatus)
19             itemStatus.statuses.each_value do |status|
20                 newStatus = status.clone
21                 newStatus.item = @item
22                 add(status.clone)
23             end
24         end
25 
26         def select(name)
27             return @statuses[name]
28         end
29 
30         def parse(part)
31             parsed = false
32             statuses = @statuses.values
33             i = 0
34             while (i < statuses.size) && (!parsed)
35                 parsed = statuses[i].parse(part)
36                 i += 1
37             end
38             return parsed
39         end
40 
41         def to_s
42             retVal = ""
43             @statuses.each_value do |status|
44                 retVal += status.to_s
45             end
46             return retVal
47         end
48     end
49 end

Generated on Mon May 23 16:17:46 +0900 2011 with rcov 0.9.8