wwwjdic 14.0.0 → 15.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +19 -0
- data/Gemfile +5 -1
- data/README.md +461 -192
- data/Rakefile +7 -2
- data/copyright.md +17 -29
- data/examples/basics.rb +51 -45
- data/examples/translate.rb +135 -86
- data/examples/uri.rb +34 -78
- data/html/CHANGELOG.html +48 -31
- data/html/COPYING_md.html +31 -35
- data/html/Gemfile.html +28 -32
- data/html/Object.html +71 -71
- data/html/README_md.html +326 -159
- data/html/Rakefile.html +29 -33
- data/html/WWWJDic.html +137 -98
- data/html/WWWJDic/ParsableDuckType.html +55 -55
- data/html/WWWJDic/Parser.html +88 -88
- data/html/WWWJDic/Parsers.html +33 -33
- data/html/WWWJDic/Parsers/Dict.html +71 -73
- data/html/WWWJDic/Parsers/Display.html +66 -66
- data/html/WWWJDic/Parsers/Key.html +67 -67
- data/html/WWWJDic/Parsers/Search.html +59 -58
- data/html/WWWJDic/Parsers/Server.html +66 -66
- data/html/WWWJDic/Splitter.html +173 -172
- data/html/WWWJDic/Utils.html +34 -34
- data/html/WWWJDic/Utils/Downloader.html +33 -33
- data/html/WWWJDic/Utils/Downloader/Downloader.html +91 -89
- data/html/WWWJDic/Utils/Raisers.html +95 -95
- data/html/WWWJDic/WWWJDic.html +343 -345
- data/html/copyright_md.html +37 -51
- data/html/created.rid +55 -57
- data/html/index.html +334 -164
- data/html/js/darkfish.js +84 -84
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +110 -110
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +229 -229
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +44 -75
- data/lib/wwwjdic.rb +7 -11
- data/lib/wwwjdic/application.rb +13 -7
- data/lib/wwwjdic/constants.rb +16 -8
- data/lib/wwwjdic/locales/de.yml +5 -4
- data/lib/wwwjdic/locales/en.yml +5 -4
- data/lib/wwwjdic/locales/es.yml +5 -4
- data/lib/wwwjdic/locales/fr.yml +6 -4
- data/lib/wwwjdic/locales/hu.yml +6 -4
- data/lib/wwwjdic/locales/it.yml +6 -4
- data/lib/wwwjdic/locales/ja.yml +8 -4
- data/lib/wwwjdic/locales/nl.yml +5 -4
- data/lib/wwwjdic/locales/ru.yml +5 -4
- data/lib/wwwjdic/locales/sl.yml +5 -4
- data/lib/wwwjdic/locales/sv.yml +5 -4
- data/lib/wwwjdic/parser.rb +8 -4
- data/lib/wwwjdic/parsers/dict.rb +9 -7
- data/lib/wwwjdic/parsers/display.rb +6 -2
- data/lib/wwwjdic/parsers/key.rb +8 -3
- data/lib/wwwjdic/parsers/search.rb +8 -3
- data/lib/wwwjdic/parsers/server.rb +6 -2
- data/lib/wwwjdic/utils/downloader.rb +21 -23
- data/lib/wwwjdic/utils/raisers.rb +7 -3
- data/lib/wwwjdic/utils/splitter.rb +20 -14
- data/lib/wwwjdic/version.rb +2 -6
- data/test/test_helper.rb +5 -1
- data/test/test_wwwjdic.rb +6 -2
- data/test/wwwjdic/locales/de.yml +7 -1
- data/test/wwwjdic/locales/en.yml +7 -1
- data/test/wwwjdic/locales/es.yml +7 -1
- data/test/wwwjdic/locales/fr.yml +7 -1
- data/test/wwwjdic/locales/hu.yml +7 -1
- data/test/wwwjdic/locales/it.yml +10 -3
- data/test/wwwjdic/locales/ja.yml +9 -2
- data/test/wwwjdic/locales/nl.yml +7 -1
- data/test/wwwjdic/locales/ru.yml +7 -1
- data/test/wwwjdic/locales/sl.yml +7 -1
- data/test/wwwjdic/locales/sv.yml +7 -1
- data/test/wwwjdic/locales/test_locales.rb +12 -9
- data/test/wwwjdic/parsers/test_dict.rb +6 -2
- data/test/wwwjdic/parsers/test_display.rb +6 -2
- data/test/wwwjdic/parsers/test_key.rb +6 -2
- data/test/wwwjdic/parsers/test_server.rb +6 -2
- data/test/wwwjdic/test_application.rb +12 -8
- data/test/wwwjdic/test_parsable_duck_type.rb +6 -2
- data/test/wwwjdic/utils/test_downloader.rb +5 -1
- data/test/wwwjdic/utils/test_raisers.rb +10 -6
- data/wwwjdic.gemspec +30 -14
- metadata +50 -22
- data/acknowledgements.md +0 -55
- data/authors.md +0 -67
- data/html/acknowledgements_md.html +0 -150
- data/html/authors_md.html +0 -182
data/html/WWWJDic/Parsers.html
CHANGED
@@ -4,18 +4,18 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>module WWWJDic::Parsers - wwwjdic
|
7
|
+
<title>module WWWJDic::Parsers - wwwjdic 15.0.0</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
11
|
var index_rel_prefix = "../";
|
12
12
|
</script>
|
13
13
|
|
14
|
-
<script src="../js/navigation.js"
|
15
|
-
<script src="../js/search.js"
|
16
|
-
<script src="../js/search_index.js"
|
17
|
-
<script src="../js/searcher.js"
|
18
|
-
<script src="../js/darkfish.js"
|
14
|
+
<script defer src="../js/navigation.js"></script>
|
15
|
+
<script defer src="../js/search.js"></script>
|
16
|
+
<script defer src="../js/search_index.js"></script>
|
17
|
+
<script defer src="../js/searcher.js"></script>
|
18
|
+
<script defer src="../js/darkfish.js"></script>
|
19
19
|
|
20
20
|
<link href="../css/fonts.css" rel="stylesheet">
|
21
21
|
<link href="../css/rdoc.css" rel="stylesheet">
|
@@ -23,10 +23,10 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
<body id="top" role="document"
|
26
|
+
<body class="module" id="top" role="document">
|
27
27
|
<nav role="navigation">
|
28
28
|
<div id="project-navigation">
|
29
|
-
<div id="home-section" role="region" title="Quick navigation"
|
29
|
+
<div class="nav-section" id="home-section" role="region" title="Quick navigation">
|
30
30
|
<h2>
|
31
31
|
<a href="../index.html" rel="home">Home</a>
|
32
32
|
</h2>
|
@@ -38,54 +38,54 @@
|
|
38
38
|
</div>
|
39
39
|
</div>
|
40
40
|
|
41
|
-
<div
|
42
|
-
<form action="#" method="get"
|
41
|
+
<div class="project-section initially-hidden" id="search-section" role="search">
|
42
|
+
<form accept-charset="utf-8" action="#" method="get">
|
43
43
|
<div id="search-field-wrapper">
|
44
|
-
<input
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
<input aria-autocomplete="list" aria-controls="search-results" aria-label="Search"
|
45
|
+
id="search-field" name="search"
|
46
|
+
placeholder="Search" role="combobox" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"
|
47
|
+
type="text">
|
48
48
|
</div>
|
49
49
|
|
50
|
-
<ul
|
51
|
-
aria-
|
52
|
-
|
50
|
+
<ul aria-atomic="false" aria-busy="false"
|
51
|
+
aria-expanded="false" aria-label="Search Results"
|
52
|
+
class="initially-hidden" id="search-results"></ul>
|
53
53
|
</form>
|
54
54
|
</div>
|
55
55
|
|
56
56
|
</div>
|
57
57
|
|
58
|
-
|
58
|
+
|
59
59
|
|
60
60
|
<div id="class-metadata">
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
66
|
</div>
|
67
67
|
</nav>
|
68
68
|
|
69
|
-
<main
|
70
|
-
<h1 id="module-WWWJDic::Parsers"
|
69
|
+
<main aria-labelledby="module-WWWJDic::Parsers" role="main">
|
70
|
+
<h1 class="module" id="module-WWWJDic::Parsers">
|
71
71
|
module WWWJDic::Parsers
|
72
72
|
</h1>
|
73
73
|
|
74
74
|
<section class="description">
|
75
|
-
|
75
|
+
|
76
76
|
</section>
|
77
77
|
|
78
|
-
|
79
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
80
|
-
|
81
78
|
|
82
|
-
|
79
|
+
<section class="documentation-section" id="5Buntitled-5D">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
83
86
|
|
84
|
-
|
85
87
|
|
86
|
-
|
87
88
|
|
88
|
-
|
89
89
|
</section>
|
90
90
|
|
91
91
|
</main>
|
@@ -4,18 +4,18 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Parsers::Dict - wwwjdic
|
7
|
+
<title>class WWWJDic::Parsers::Dict - wwwjdic 15.0.0</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../../";
|
11
11
|
var index_rel_prefix = "../../";
|
12
12
|
</script>
|
13
13
|
|
14
|
-
<script src="../../js/navigation.js"
|
15
|
-
<script src="../../js/search.js"
|
16
|
-
<script src="../../js/search_index.js"
|
17
|
-
<script src="../../js/searcher.js"
|
18
|
-
<script src="../../js/darkfish.js"
|
14
|
+
<script defer src="../../js/navigation.js"></script>
|
15
|
+
<script defer src="../../js/search.js"></script>
|
16
|
+
<script defer src="../../js/search_index.js"></script>
|
17
|
+
<script defer src="../../js/searcher.js"></script>
|
18
|
+
<script defer src="../../js/darkfish.js"></script>
|
19
19
|
|
20
20
|
<link href="../../css/fonts.css" rel="stylesheet">
|
21
21
|
<link href="../../css/rdoc.css" rel="stylesheet">
|
@@ -23,10 +23,10 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
<body id="top" role="document"
|
26
|
+
<body class="class" id="top" role="document">
|
27
27
|
<nav role="navigation">
|
28
28
|
<div id="project-navigation">
|
29
|
-
<div id="home-section" role="region" title="Quick navigation"
|
29
|
+
<div class="nav-section" id="home-section" role="region" title="Quick navigation">
|
30
30
|
<h2>
|
31
31
|
<a href="../../index.html" rel="home">Home</a>
|
32
32
|
</h2>
|
@@ -38,69 +38,69 @@
|
|
38
38
|
</div>
|
39
39
|
</div>
|
40
40
|
|
41
|
-
<div
|
42
|
-
<form action="#" method="get"
|
41
|
+
<div class="project-section initially-hidden" id="search-section" role="search">
|
42
|
+
<form accept-charset="utf-8" action="#" method="get">
|
43
43
|
<div id="search-field-wrapper">
|
44
|
-
<input
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
<input aria-autocomplete="list" aria-controls="search-results" aria-label="Search"
|
45
|
+
id="search-field" name="search"
|
46
|
+
placeholder="Search" role="combobox" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"
|
47
|
+
type="text">
|
48
48
|
</div>
|
49
49
|
|
50
|
-
<ul
|
51
|
-
aria-
|
52
|
-
|
50
|
+
<ul aria-atomic="false" aria-busy="false"
|
51
|
+
aria-expanded="false" aria-label="Search Results"
|
52
|
+
class="initially-hidden" id="search-results"></ul>
|
53
53
|
</form>
|
54
54
|
</div>
|
55
55
|
|
56
56
|
</div>
|
57
57
|
|
58
|
-
|
58
|
+
|
59
59
|
|
60
60
|
<div id="class-metadata">
|
61
|
-
|
62
|
-
<div
|
61
|
+
|
62
|
+
<div class="nav-section" id="parent-class-section">
|
63
63
|
<h3>Parent</h3>
|
64
64
|
|
65
|
-
|
65
|
+
|
66
66
|
<p class="link"><a href="../../Object.html">Object</a>
|
67
|
-
|
67
|
+
|
68
68
|
</div>
|
69
69
|
|
70
|
-
<div
|
70
|
+
<div class="nav-section" id="includes-section">
|
71
71
|
<h3>Included Modules</h3>
|
72
72
|
|
73
73
|
<ul class="link-list">
|
74
|
-
|
75
|
-
|
74
|
+
|
75
|
+
|
76
76
|
<li><a class="include" href="../Utils/Raisers.html">WWWJDic::Utils::Raisers</a>
|
77
|
-
|
78
|
-
|
77
|
+
|
78
|
+
|
79
79
|
</ul>
|
80
80
|
</div>
|
81
81
|
|
82
|
-
|
82
|
+
|
83
83
|
<!-- Method Quickref -->
|
84
|
-
<div
|
84
|
+
<div class="nav-section" id="method-list-section">
|
85
85
|
<h3>Methods</h3>
|
86
86
|
|
87
87
|
<ul class="link-list" role="directory">
|
88
|
-
|
88
|
+
|
89
89
|
<li ><a href="#method-i-parse">#parse</a>
|
90
|
-
|
90
|
+
|
91
91
|
</ul>
|
92
92
|
</div>
|
93
93
|
|
94
94
|
</div>
|
95
95
|
</nav>
|
96
96
|
|
97
|
-
<main
|
98
|
-
<h1 id="class-WWWJDic::Parsers::Dict"
|
97
|
+
<main aria-labelledby="class-WWWJDic::Parsers::Dict" role="main">
|
98
|
+
<h1 class="class" id="class-WWWJDic::Parsers::Dict">
|
99
99
|
class WWWJDic::Parsers::Dict
|
100
100
|
</h1>
|
101
101
|
|
102
102
|
<section class="description">
|
103
|
-
|
103
|
+
|
104
104
|
<p>This class is an implementation of the Parsable duck type that checks the dictionary type. The only needed parameter is a valid dictionary.</p>
|
105
105
|
|
106
106
|
<p>n = dictionary to use (1 = EDICT, 3 = ENAMDICT, etc. Examine the source of one of the pages to get the full list of codes.)</p>
|
@@ -109,7 +109,7 @@
|
|
109
109
|
<p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p>
|
110
110
|
</dd><dt>Copyright
|
111
111
|
<dd>
|
112
|
-
<p>
|
112
|
+
<p>(C) 2014 Marco Bresciani</p>
|
113
113
|
</dd><dt>License
|
114
114
|
<dd>
|
115
115
|
<p>GNU General Public License version 3</p>
|
@@ -117,70 +117,68 @@
|
|
117
117
|
|
118
118
|
</section>
|
119
119
|
|
120
|
-
|
121
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
122
|
-
|
123
120
|
|
124
|
-
|
121
|
+
<section class="documentation-section" id="5Buntitled-5D">
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
125
126
|
|
126
|
-
|
127
127
|
|
128
|
-
|
129
128
|
|
130
|
-
|
131
|
-
|
129
|
+
|
130
|
+
|
131
|
+
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
132
132
|
<header>
|
133
133
|
<h3>Public Instance Methods</h3>
|
134
134
|
</header>
|
135
135
|
|
136
|
-
|
137
|
-
<div
|
138
|
-
|
136
|
+
|
137
|
+
<div class="method-detail " id="method-i-parse">
|
138
|
+
|
139
139
|
<div class="method-heading">
|
140
140
|
<span class="method-name">parse</span><span
|
141
141
|
class="method-args">(value = '1')</span>
|
142
|
-
|
142
|
+
|
143
143
|
<span class="method-click-advice">click to toggle source</span>
|
144
|
-
|
144
|
+
|
145
145
|
</div>
|
146
|
-
|
146
|
+
|
147
147
|
|
148
148
|
<div class="method-description">
|
149
|
-
|
149
|
+
|
150
150
|
<p>The parsable duck type interface to every parser usage.</p>
|
151
|
-
|
152
|
-
|
153
151
|
|
154
|
-
|
152
|
+
|
153
|
+
|
154
|
+
|
155
155
|
<div class="method-source-code" id="parse-source">
|
156
156
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parsers/dict.rb</span>
|
157
|
-
<span class="line-num">
|
158
|
-
<span class="line-num">
|
159
|
-
<span class="line-num">
|
160
|
-
<span class="line-num">
|
161
|
-
<span class="line-num">
|
162
|
-
<span class="line-num">
|
163
|
-
<span class="line-num">
|
164
|
-
<span class="line-num">
|
165
|
-
<span class="line-num">
|
166
|
-
<span class="line-num">
|
167
|
-
<span class="line-num">
|
168
|
-
<span class="line-num">
|
169
|
-
<span class="line-num">
|
170
|
-
<span class="line-num">54</span> <span class="ruby-keyword">end</span>
|
171
|
-
<span class="line-num">55</span> <span class="ruby-keyword">end</span></pre>
|
157
|
+
<span class="line-num">45</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse</span>(<span class="ruby-identifier">value</span> = <span class="ruby-string">'1'</span>)
|
158
|
+
<span class="line-num">46</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">'error.nil'</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
|
159
|
+
<span class="line-num">47</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">'error.param'</span>, <span class="ruby-value">value:</span> <span class="ruby-identifier">value</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:length</span>
|
160
|
+
<span class="line-num">48</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">'error.param'</span>, <span class="ruby-value">value:</span> <span class="ruby-identifier">value</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">empty?</span>
|
161
|
+
<span class="line-num">49</span>
|
162
|
+
<span class="line-num">50</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
163
|
+
<span class="line-num">51</span> <span class="ruby-identifier">raiser_array</span>(<span class="ruby-string">'error.param'</span>, <span class="ruby-identifier">value</span>, <span class="ruby-constant">DICTIONARY_CODES</span>)
|
164
|
+
<span class="line-num">52</span> <span class="ruby-identifier">value</span>
|
165
|
+
<span class="line-num">53</span> <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>
|
166
|
+
<span class="line-num">54</span> <span class="ruby-identifier">raiser_array</span>(<span class="ruby-string">'error.param'</span>, <span class="ruby-identifier">value</span>, <span class="ruby-constant">DICTIONARY_NAMES</span>)
|
167
|
+
<span class="line-num">55</span> <span class="ruby-constant">DICTS_BY_NAMES</span>[<span class="ruby-identifier">value</span>]
|
168
|
+
<span class="line-num">56</span> <span class="ruby-keyword">end</span>
|
169
|
+
<span class="line-num">57</span> <span class="ruby-keyword">end</span></pre>
|
172
170
|
</div>
|
173
|
-
|
171
|
+
|
174
172
|
</div>
|
175
173
|
|
176
|
-
|
177
174
|
|
178
|
-
|
175
|
+
|
176
|
+
|
179
177
|
</div>
|
180
178
|
|
181
|
-
|
179
|
+
|
182
180
|
</section>
|
183
|
-
|
181
|
+
|
184
182
|
</section>
|
185
183
|
|
186
184
|
</main>
|
@@ -4,18 +4,18 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Parsers::Display - wwwjdic
|
7
|
+
<title>class WWWJDic::Parsers::Display - wwwjdic 15.0.0</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../../";
|
11
11
|
var index_rel_prefix = "../../";
|
12
12
|
</script>
|
13
13
|
|
14
|
-
<script src="../../js/navigation.js"
|
15
|
-
<script src="../../js/search.js"
|
16
|
-
<script src="../../js/search_index.js"
|
17
|
-
<script src="../../js/searcher.js"
|
18
|
-
<script src="../../js/darkfish.js"
|
14
|
+
<script defer src="../../js/navigation.js"></script>
|
15
|
+
<script defer src="../../js/search.js"></script>
|
16
|
+
<script defer src="../../js/search_index.js"></script>
|
17
|
+
<script defer src="../../js/searcher.js"></script>
|
18
|
+
<script defer src="../../js/darkfish.js"></script>
|
19
19
|
|
20
20
|
<link href="../../css/fonts.css" rel="stylesheet">
|
21
21
|
<link href="../../css/rdoc.css" rel="stylesheet">
|
@@ -23,10 +23,10 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
<body id="top" role="document"
|
26
|
+
<body class="class" id="top" role="document">
|
27
27
|
<nav role="navigation">
|
28
28
|
<div id="project-navigation">
|
29
|
-
<div id="home-section" role="region" title="Quick navigation"
|
29
|
+
<div class="nav-section" id="home-section" role="region" title="Quick navigation">
|
30
30
|
<h2>
|
31
31
|
<a href="../../index.html" rel="home">Home</a>
|
32
32
|
</h2>
|
@@ -38,69 +38,69 @@
|
|
38
38
|
</div>
|
39
39
|
</div>
|
40
40
|
|
41
|
-
<div
|
42
|
-
<form action="#" method="get"
|
41
|
+
<div class="project-section initially-hidden" id="search-section" role="search">
|
42
|
+
<form accept-charset="utf-8" action="#" method="get">
|
43
43
|
<div id="search-field-wrapper">
|
44
|
-
<input
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
<input aria-autocomplete="list" aria-controls="search-results" aria-label="Search"
|
45
|
+
id="search-field" name="search"
|
46
|
+
placeholder="Search" role="combobox" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"
|
47
|
+
type="text">
|
48
48
|
</div>
|
49
49
|
|
50
|
-
<ul
|
51
|
-
aria-
|
52
|
-
|
50
|
+
<ul aria-atomic="false" aria-busy="false"
|
51
|
+
aria-expanded="false" aria-label="Search Results"
|
52
|
+
class="initially-hidden" id="search-results"></ul>
|
53
53
|
</form>
|
54
54
|
</div>
|
55
55
|
|
56
56
|
</div>
|
57
57
|
|
58
|
-
|
58
|
+
|
59
59
|
|
60
60
|
<div id="class-metadata">
|
61
|
-
|
62
|
-
<div
|
61
|
+
|
62
|
+
<div class="nav-section" id="parent-class-section">
|
63
63
|
<h3>Parent</h3>
|
64
64
|
|
65
|
-
|
65
|
+
|
66
66
|
<p class="link"><a href="../../Object.html">Object</a>
|
67
|
-
|
67
|
+
|
68
68
|
</div>
|
69
69
|
|
70
|
-
<div
|
70
|
+
<div class="nav-section" id="includes-section">
|
71
71
|
<h3>Included Modules</h3>
|
72
72
|
|
73
73
|
<ul class="link-list">
|
74
|
-
|
75
|
-
|
74
|
+
|
75
|
+
|
76
76
|
<li><a class="include" href="../Utils/Raisers.html">WWWJDic::Utils::Raisers</a>
|
77
|
-
|
78
|
-
|
77
|
+
|
78
|
+
|
79
79
|
</ul>
|
80
80
|
</div>
|
81
81
|
|
82
|
-
|
82
|
+
|
83
83
|
<!-- Method Quickref -->
|
84
|
-
<div
|
84
|
+
<div class="nav-section" id="method-list-section">
|
85
85
|
<h3>Methods</h3>
|
86
86
|
|
87
87
|
<ul class="link-list" role="directory">
|
88
|
-
|
88
|
+
|
89
89
|
<li ><a href="#method-i-parse">#parse</a>
|
90
|
-
|
90
|
+
|
91
91
|
</ul>
|
92
92
|
</div>
|
93
93
|
|
94
94
|
</div>
|
95
95
|
</nav>
|
96
96
|
|
97
|
-
<main
|
98
|
-
<h1 id="class-WWWJDic::Parsers::Display"
|
97
|
+
<main aria-labelledby="class-WWWJDic::Parsers::Display" role="main">
|
98
|
+
<h1 class="class" id="class-WWWJDic::Parsers::Display">
|
99
99
|
class WWWJDic::Parsers::Display
|
100
100
|
</h1>
|
101
101
|
|
102
102
|
<section class="description">
|
103
|
-
|
103
|
+
|
104
104
|
<p>This class is an implementation of the Parsable duck type that checks the display type. The only needed parameter is a boolean, with <code>true</code> for regular.</p>
|
105
105
|
|
106
106
|
<p>M = backdoor entry (regular display) or Z = backdoor entry (raw dictionary display)</p>
|
@@ -109,7 +109,7 @@
|
|
109
109
|
<p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p>
|
110
110
|
</dd><dt>Copyright
|
111
111
|
<dd>
|
112
|
-
<p>
|
112
|
+
<p>(C) 2014 Marco Bresciani</p>
|
113
113
|
</dd><dt>License
|
114
114
|
<dd>
|
115
115
|
<p>GNU General Public License version 3</p>
|
@@ -117,63 +117,63 @@
|
|
117
117
|
|
118
118
|
</section>
|
119
119
|
|
120
|
-
|
121
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
122
|
-
|
123
120
|
|
124
|
-
|
121
|
+
<section class="documentation-section" id="5Buntitled-5D">
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
125
126
|
|
126
|
-
|
127
127
|
|
128
|
-
|
129
128
|
|
130
|
-
|
131
|
-
|
129
|
+
|
130
|
+
|
131
|
+
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
132
132
|
<header>
|
133
133
|
<h3>Public Instance Methods</h3>
|
134
134
|
</header>
|
135
135
|
|
136
|
-
|
137
|
-
<div
|
138
|
-
|
136
|
+
|
137
|
+
<div class="method-detail " id="method-i-parse">
|
138
|
+
|
139
139
|
<div class="method-heading">
|
140
140
|
<span class="method-name">parse</span><span
|
141
141
|
class="method-args">(value = :display)</span>
|
142
|
-
|
142
|
+
|
143
143
|
<span class="method-click-advice">click to toggle source</span>
|
144
|
-
|
144
|
+
|
145
145
|
</div>
|
146
|
-
|
146
|
+
|
147
147
|
|
148
148
|
<div class="method-description">
|
149
|
-
|
149
|
+
|
150
150
|
<p>The parsable duck type interface to every parser usage.</p>
|
151
|
-
|
152
|
-
|
153
151
|
|
154
|
-
|
152
|
+
|
153
|
+
|
154
|
+
|
155
155
|
<div class="method-source-code" id="parse-source">
|
156
156
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parsers/display.rb</span>
|
157
|
-
<span class="line-num">
|
158
|
-
<span class="line-num">
|
159
|
-
<span class="line-num">
|
160
|
-
<span class="line-num">
|
161
|
-
<span class="line-num">
|
162
|
-
<span class="line-num">
|
163
|
-
<span class="line-num">
|
164
|
-
<span class="line-num">
|
157
|
+
<span class="line-num">44</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse</span>(<span class="ruby-identifier">value</span> = <span class="ruby-value">:display</span>)
|
158
|
+
<span class="line-num">45</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">'error.nil'</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
|
159
|
+
<span class="line-num">46</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">'error.param'</span>, <span class="ruby-value">value:</span> <span class="ruby-identifier">value</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Symbol</span>
|
160
|
+
<span class="line-num">47</span>
|
161
|
+
<span class="line-num">48</span> <span class="ruby-identifier">raiser_array</span>(<span class="ruby-string">'error.param'</span>, <span class="ruby-identifier">value</span>, <span class="ruby-constant">DISPLAY</span>.<span class="ruby-identifier">keys</span>)
|
162
|
+
<span class="line-num">49</span>
|
163
|
+
<span class="line-num">50</span> <span class="ruby-identifier">value</span>
|
164
|
+
<span class="line-num">51</span> <span class="ruby-keyword">end</span></pre>
|
165
165
|
</div>
|
166
|
-
|
166
|
+
|
167
167
|
</div>
|
168
168
|
|
169
|
-
|
170
169
|
|
171
|
-
|
170
|
+
|
171
|
+
|
172
172
|
</div>
|
173
173
|
|
174
|
-
|
174
|
+
|
175
175
|
</section>
|
176
|
-
|
176
|
+
|
177
177
|
</section>
|
178
178
|
|
179
179
|
</main>
|