Jldrill Git C0 Coverage Information - RCov

lib/jldrill/contexts/RunCommandContext.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/jldrill/contexts/RunCommandContext.rb 161 122
67.70%
57.38%

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 'Context/Context'
2 require 'Context/Bridge'
3 require 'Context/View'
4 
5 module JLDrill
6 
7 	class RunCommandContext < Context::Context
8 				
9 		def initialize(viewBridge)
10 			super(viewBridge)
11 		end
12 
13         class CommandView < Context::View
14             def initialize(context)
15                 super(context)
16             end
17 
18             # Reread the options and update the toolbar appearance
19             def update
20                 # Please define in the concrete class
21             end
22         end
23 		
24 		def createViews
25     		@mainView = @viewBridge.CommandView.new(self)
26         end
27 
28         def destroyViews
29             @mainView = nil
30         end		    
31 		
32 		def enter(parent)
33 		    super(parent)
34             if !@parent.nil?
35                 if !@parent.quiz.nil?
36                     @parent.quiz.publisher.subscribe(self, "load")
37                 end
38             end
39 		end
40 		
41 		def exit
42             if !@parent.nil?
43                 if !@parent.quiz.nil?
44                     @parent.quiz.publisher.unsubscribe(self, "load")
45                 end
46             end
47 		    super
48 		end
49 
50         def loadUpdated(quiz)
51             # This will update the toolbar based on the options.
52             @mainView.update
53         end
54 
55         def save
56             @parent.save
57         end
58         
59         def saveAs
60             @parent.saveAs
61         end
62         
63         def open
64             @parent.open
65         end
66         
67         def appendFile
68             @parent.appendFile
69         end
70         
71         def loadReference
72             @parent.loadReference
73         end
74 
75 		def loadTanaka
76 			@parent.loadTanaka
77 		end
78         
79         def quit
80             @parent.quit
81         end
82         
83         def info
84             @parent.showQuizInfo
85         end
86    
87         def statistics
88             @parent.showStatistics
89         end
90         
91         def drill
92             @parent.drill
93         end
94 
95         def check
96             @parent.showAnswer
97         end
98         
99         def incorrect
100             @parent.incorrect
101         end
102         
103         def correct
104             @parent.correct
105         end
106            
107         def vocabTable
108             @parent.showAllVocabulary
109         end
110         
111         def options
112             @parent.setOptions
113         end
114         
115         def resetQuiz
116             @parent.reset
117         end
118         
119         def editVocab
120             @parent.editVocabulary
121         end
122         
123         def deleteVocab
124             @parent.deleteVocabulary
125         end
126         
127         def addNewVocabulary
128             @parent.addNewVocabulary
129         end
130         
131         def ack
132             @parent.showAcknowlegements
133         end
134         
135         def about
136             @parent.showAbout
137         end
138         
139         def setReviewMode(bool)
140             @parent.setReviewMode(bool)
141         end
142 
143         def getReviewMode
144             retVal = false
145             retVal = @parent.quiz.options.reviewMode unless @parent.quiz.nil?
146             retVal
147         end
148         
149         def createNew
150             @parent.createNew
151         end
152 
153         def learn
154             @parent.learn
155         end
156 
157         def removeDups
158             @parent.removeDups
159         end
160     end
161 end

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