C0 code coverage information
Generated on Fri Aug 25 11:26:27 PDT 2006 with rcov 0.7.0
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 class Link
2 attr_accessor :title
3 attr_reader :url
4
5 def initialize(url, title)
6 @url, @title = fix_url(url), title
7 end
8
9 def initialize(hash = {})
10 @url, @title = fix_url(hash[:url]), hash[:title]
11 end
12
13 def url=(url)
14 @url = fix_url(url)
15 end
16
17 private
18
19 def fix_url(url)
20 unless url
21 return nil
22 end
23 unless url.include? 'http://' or url.include? 'https://'
24 fixed_url = 'http://' + url
25 else
26 fixed_url = url
27 end
28 fixed_url
29 end
30 end
Generated using the rcov code coverage analysis tool for Ruby version 0.7.0.