Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
lib/jldrill/model/Config.rb | 37 | 25 | 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 'rubygems' |
2 |
3 module JLDrill |
4 # Configuration data for JLDrill. This is how JLDrill knows where |
5 # to find it's data. |
6 module Config |
7 def Config::configSrcDir |
8 File.expand_path(File.dirname(__FILE__)) |
9 end |
10 |
11 # In a source repository, this gives the top level directory |
12 # If the source has been installed by a package, then who knows |
13 # where this is... |
14 def Config::repositoryDir |
15 File.expand_path(File.join(Config::configSrcDir, "../../..")) |
16 end |
17 |
18 def Config::getDataDir |
19 if !Gem::datadir("jldrill").nil? |
20 # Use the data directory in the Gem if it is available |
21 File.expand_path(Gem::datadir("jldrill")) |
22 else |
23 # Otherwise hope we are in a source repository and |
24 # can find the data dir in the usual spot |
25 File.join(repositoryDir, "data/jldrill") |
26 end |
27 end |
28 |
29 DATA_DIR = getDataDir |
30 DICTIONARY_DIR = File.join(DATA_DIR, "dict") |
31 DICTIONARY_NAME = "edict" |
32 TANAKA_DIR = File.join(DATA_DIR, "Tanaka") |
33 TANAKA_NAME = "examples.utf" |
34 DEINFLECTION_DIR = File.join(DATA_DIR, "dict/rikaichan") |
35 DEINFLECTION_NAME = "deinflect.dat" |
36 end |
37 end |
Generated on Mon May 23 16:17:46 +0900 2011 with rcov 0.9.8