Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
lib/jldrill/contexts/AddNewVocabularyContext.rb | 29 | 22 | 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 'jldrill/contexts/ModifyVocabularyContext' |
2 |
3 module JLDrill |
4 |
5 class AddNewVocabularyContext < ModifyVocabularyContext |
6 |
7 def initialize(viewBridge) |
8 super(viewBridge) |
9 @actionName = "Add" |
10 end |
11 |
12 # This is called when the action button is pressed on the |
13 # view. In this case it adds the vocabulary to the quiz. |
14 def doAction(vocabulary) |
15 if vocabulary.valid? |
16 addVocabulary(vocabulary) |
17 @mainView.clearVocabulary |
18 end |
19 end |
20 |
21 def addVocabulary(vocab) |
22 if !@parent.nil? && !@parent.quiz.nil? |
23 item = @parent.quiz.appendVocab(vocab) |
24 @parent.displayItem(item) |
25 @parent.updateQuizStatus |
26 end |
27 end |
28 end |
29 end |
Generated on Mon May 23 16:17:45 +0900 2011 with rcov 0.9.8