Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
lib/jldrill/contexts/LoadKanjiContext.rb | 64 | 51 | 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 'jldrill/model/Config' |
4 require 'jldrill/contexts/LoadFileContext' |
5 |
6 module JLDrill |
7 |
8 # Load the kanji, radicals and kana files one after another. |
9 class LoadKanjiContext < Context::Context |
10 |
11 attr_reader :kanjiFile, :radicalsFile, :kanaFile |
12 attr_writer :kanjiFile, :radicalsFile, :kanaFile |
13 |
14 def initialize(viewBridge) |
15 super(viewBridge) |
16 @kanjiFile = Config::getDataDir + "/dict/rikaichan/kanji.dat" |
17 @radicalsFile = Config::getDataDir + "/dict/rikaichan/radicals.dat" |
18 @kanaFile = Config::getDataDir + "/dict/Kana/kana.dat" |
19 @loadFileContext = LoadFileContext.new(@viewBridge) |
20 end |
21 |
22 def createViews |
23 @mainView = @viewBridge.VBoxView.new(self) |
24 end |
25 |
26 def destroyViews |
27 @mainView = nil |
28 end |
29 |
30 def loadKanji |
31 @loadFileContext.onExit do |
32 loadRadicals |
33 end |
34 @loadFileContext.enter(self, @kanji, @kanjiFile) |
35 end |
36 |
37 def loadRadicals |
38 @loadFileContext.onExit do |
39 loadKana |
40 end |
41 @loadFileContext.enter(self, @radicals, @radicalsFile) |
42 end |
43 |
44 def loadKana |
45 @loadFileContext.onExit do |
46 exitLoadKanjiContext |
47 end |
48 @loadFileContext.enter(self, @kana, @kanaFile) |
49 end |
50 |
51 def exitLoadKanjiContext |
52 self.exit |
53 end |
54 |
55 def enter(parent, kanji, radicals, kana) |
56 super(parent) |
57 @kanji = kanji |
58 @radicals = radicals |
59 @kana = kana |
60 loadKanji |
61 end |
62 |
63 end |
64 end |
Generated on Mon May 23 16:17:45 +0900 2011 with rcov 0.9.8