Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
lib/jldrill/contexts/DisplayQuizStatusContext.rb | 47 | 35 | 100.00%
|
100.00%
|
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 require 'Context/Context' |
2 require 'Context/Bridge' |
3 require 'Context/View' |
4 |
5 module JLDrill |
6 |
7 class DisplayQuizStatusContext < Context::Context |
8 |
9 def initialize(viewBridge) |
10 super(viewBridge) |
11 end |
12 |
13 class QuizStatusView < Context::View |
14 def initialize(context) |
15 super(context) |
16 end |
17 |
18 def update(quiz) |
19 # Should be overridden in the concrete class |
20 end |
21 end |
22 |
23 def createViews |
24 @mainView = @viewBridge.QuizStatusView.new(self) |
25 end |
26 |
27 def destroyViews |
28 @mainView = nil |
29 end |
30 |
31 def enter(parent) |
32 super(parent) |
33 quizUpdated(@parent.quiz) |
34 @parent.quiz.subscribe(self) |
35 end |
36 |
37 def exit |
38 @parent.quiz.unsubscribe(self) |
39 super |
40 end |
41 |
42 def quizUpdated(quiz) |
43 @mainView.update(quiz) |
44 end |
45 |
46 end |
47 end |
Generated on Mon May 23 16:17:45 +0900 2011 with rcov 0.9.8