C0 code coverage information

Generated on Tue Oct 16 11:40:50 -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/ui/dialogs/misc_dialogs.rb 72 61
26.4% 
19.7% 
 1 module Alexandria
 2 	module UI
 3 		class ConflictWhileCopyingDialog < AlertDialog
 4 				include GetText
 5 				GetText.bindtextdomain(Alexandria::TEXTDOMAIN, nil, nil, "UTF-8")
 6 
 7 				def initialize(parent, library, book)
 8 						super(parent, 
 9 									_("The book '%s' already exists in '%s'. Would you like " +
10 										"to replace it?") % [ book.title, library.name ],
11 									Gtk::Stock::DIALOG_QUESTION,
12 									[[_("_Skip"), Gtk::Dialog::RESPONSE_CANCEL],
13 									 [_("_Replace"), Gtk::Dialog::RESPONSE_OK]],
14 									_("If you replace the existing book, its contents will " +
15 										"be overwritten."))
16 						self.default_response = Gtk::Dialog::RESPONSE_CANCEL
17 						show_all and @response = run
18 						destroy
19 				end
20 
21 				def replace?
22 						@response == Gtk::Dialog::RESPONSE_OK
23 				end
24 		end
25 
26 		class ReallyDeleteDialog < AlertDialog
27 				include GetText
28 				GetText.bindtextdomain(Alexandria::TEXTDOMAIN, nil, nil, "UTF-8")
29 				
30 				def initialize(parent, library, books=nil)
31 						# Deleting a library.
32 						if books.nil?
33 								message = _("Are you sure you want to delete '%s'?") \
34 										% library.name
35 								description = if library.is_a?(SmartLibrary) \
36 																 or library.empty?
37 										nil
38 								else
39 										n_("If you continue, %d book will be deleted.",
40 											 "If you continue, %d books will be deleted.", 
41 											 library.size) % library.size
42 								end
43 						# Deleting books.
44 						else
45 								message = if books.length == 1
46 										_("Are you sure you want to delete '%s' " +
47 											"from '%s'?") % [ books.first.title, library.name ]
48 								else
49 										_("Are you sure you want to delete the " +
50 											"selected books from '%s'?") % library.name
51 								end
52 								description = nil
53 						end
54 
55 						super(parent, message, Gtk::Stock::DIALOG_QUESTION,
56 									[[Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL],
57 									 [Gtk::Stock::DELETE, Gtk::Dialog::RESPONSE_OK]],
58 									description)
59 
60 						self.default_response = Gtk::Dialog::RESPONSE_CANCEL
61 						show_all and @response = run
62 						destroy
63 				end
64 
65 				def ok?
66 						@response == Gtk::Dialog::RESPONSE_OK
67 				end
68 		end
69 	end
70 end
71 
72 

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

Valid XHTML 1.0! Valid CSS!