C0 code coverage information

Generated on Tue Oct 16 11:40:47 -0400 2007 with rcov 0.8.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.
Name Total lines Lines of code Total coverage Code coverage
lib/alexandria/book.rb 69 42
88.4% 
81.0% 
 1 # Copyright (C) 2004-2006 Laurent Sansonetti
 2 #
 3 # Alexandria is free software; you can redistribute it and/or
 4 # modify it under the terms of the GNU General Public License as
 5 # published by the Free Software Foundation; either version 2 of the
 6 # License, or (at your option) any later version.
 7 #
 8 # Alexandria is distributed in the hope that it will be useful,
 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public
14 # License along with Alexandria; see the file COPYING.  If not,
15 # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 # Boston, MA 02111-1307, USA.
17 
18 module Alexandria
19   class Book
20     attr_accessor :title, :authors, :isbn, :publisher, :publishing_year,
21       :edition, :rating, :notes, :loaned, :loaned_since, 
22       :loaned_to, :saved_ident, :redd, :own, :want, :tags, :version
23 
24     DEFAULT_RATING = 0 
25 
26     def initialize(title, authors, isbn, publisher, publishing_year, 
27                    edition)
28 
29       @title = title
30       @authors = authors
31       @isbn = isbn
32       @publisher = publisher
33       @edition = edition
34       @notes = ""
35       @saved_ident = ident
36       @publishing_year = publishing_year
37       @redd = false
38       @own = true
39       @want = true
40       @tags = []
41       # Need to implement bulk save function to update this
42       @version = VERSION
43     end
44 
45     def ident
46       @isbn or @title.hash.to_s
47     end
48 
49     def loaned? 
50       loaned or false
51     end
52 
53     def redd?
54       redd or false
55     end
56 
57     def want?
58       want or false
59     end
60 
61     def own?
62       own or false
63     end
64 
65     def ==(obj)
66       obj.is_a?(self.class) and self.ident == obj.ident
67     end
68   end
69 end

Generated using the rcov code coverage analysis tool for Ruby version 0.8.0.

Valid XHTML 1.0! Valid CSS!