Jldrill Git C0 Coverage Information - RCov

lib/jldrill/model/items/StringField.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/jldrill/model/items/StringField.rb 54 39
96.30%
94.87%

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 require "jldrill/model/items/Field"
2 
3 # Represents a string type Field in a Vocabulary
4 
5 module JLDrill
6     class StringField < Field
7 
8         def initialize(name, data)
9             super(name)
10             @contents = data
11         end
12         
13         def fromString(string)
14             string
15         end
16             
17         # Returns the actual contents of the field
18         def contents
19             @contents
20         end
21 
22         # Returns a string of the field that has not been processed
23         # for output
24         def raw
25             if assigned?
26                 @contents
27             else
28                 ""
29             end
30         end
31 
32         def copy(field)
33             if field.assigned?
34                 @contents = field.contents
35             else
36                 @contents = nil
37             end
38         end
39 
40         def assign(string)
41             @contents = processInput(string)
42         end
43 
44         def eql?(string)
45             if contents.nil? || contents.empty?
46                 !assigned?
47             else
48                 @contents.eql?(string)
49             end
50         end
51 
52     end
53 end
54 

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