wwwjdic 15.0.0 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +13 -0
- data/Gemfile +4 -0
- data/README.md +6 -7
- data/Rakefile +4 -0
- data/examples/basics.rb +4 -0
- data/examples/translate.rb +26 -0
- data/examples/uri.rb +16 -0
- data/html/CHANGELOG.html +37 -30
- data/html/COPYING_md.html +22 -30
- data/html/Gemfile.html +25 -31
- data/html/Object.html +825 -63
- data/html/README_md.html +27 -33
- data/html/Rakefile.html +25 -31
- data/html/WWWJDic.html +42 -124
- data/html/WWWJDic/ParsableDuckType.html +35 -57
- data/html/WWWJDic/Parser.html +48 -90
- data/html/WWWJDic/Parsers.html +28 -36
- data/html/WWWJDic/Parsers/Dict.html +47 -73
- data/html/WWWJDic/Parsers/Display.html +42 -68
- data/html/WWWJDic/Parsers/Key.html +42 -68
- data/html/WWWJDic/Parsers/Search.html +38 -61
- data/html/WWWJDic/Parsers/Server.html +42 -68
- data/html/WWWJDic/Splitter.html +76 -173
- data/html/WWWJDic/Utils.html +28 -36
- data/html/WWWJDic/Utils/Downloader.html +28 -36
- data/html/WWWJDic/Utils/Downloader/Downloader.html +41 -80
- data/html/WWWJDic/Utils/Raisers.html +42 -96
- data/html/WWWJDic/WWWJDic.html +160 -342
- data/html/copyright_md.html +22 -30
- data/html/created.rid +32 -54
- data/html/css/rdoc.css +1 -1
- data/html/index.html +26 -51
- 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 +153 -161
- data/lib/wwwjdic.rb +7 -4
- data/lib/wwwjdic/application.rb +52 -25
- data/lib/wwwjdic/constants.rb +33 -3
- data/lib/wwwjdic/locales/de.yml +2 -0
- data/lib/wwwjdic/locales/en.yml +2 -0
- data/lib/wwwjdic/locales/es.yml +2 -0
- data/lib/wwwjdic/locales/fr.yml +2 -0
- data/lib/wwwjdic/locales/hu.yml +2 -0
- data/lib/wwwjdic/locales/it.yml +2 -0
- data/lib/wwwjdic/locales/ja.yml +3 -1
- data/lib/wwwjdic/locales/nl.yml +2 -0
- data/lib/wwwjdic/locales/ru.yml +2 -0
- data/lib/wwwjdic/locales/sl.yml +2 -0
- data/lib/wwwjdic/locales/sv.yml +2 -0
- data/lib/wwwjdic/parser.rb +7 -4
- data/lib/wwwjdic/parsers/dict.rb +4 -1
- data/lib/wwwjdic/parsers/display.rb +4 -1
- data/lib/wwwjdic/parsers/key.rb +4 -1
- data/lib/wwwjdic/parsers/search.rb +4 -0
- data/lib/wwwjdic/parsers/server.rb +4 -1
- data/lib/wwwjdic/utils/downloader.rb +7 -8
- data/lib/wwwjdic/utils/raisers.rb +7 -13
- data/lib/wwwjdic/utils/splitter.rb +18 -9
- data/lib/wwwjdic/version.rb +5 -1
- data/test/test_helper.rb +4 -0
- data/test/test_wwwjdic.rb +4 -0
- data/test/wwwjdic/locales/de.yml +2 -0
- data/test/wwwjdic/locales/en.yml +2 -0
- data/test/wwwjdic/locales/es.yml +2 -0
- data/test/wwwjdic/locales/fr.yml +2 -0
- data/test/wwwjdic/locales/hu.yml +2 -0
- data/test/wwwjdic/locales/it.yml +2 -0
- data/test/wwwjdic/locales/ja.yml +2 -0
- data/test/wwwjdic/locales/nl.yml +2 -0
- data/test/wwwjdic/locales/ru.yml +2 -0
- data/test/wwwjdic/locales/sl.yml +2 -0
- data/test/wwwjdic/locales/sv.yml +2 -0
- data/test/wwwjdic/locales/test_locales.rb +35 -19
- data/test/wwwjdic/parsers/test_dict.rb +62 -36
- data/test/wwwjdic/parsers/test_display.rb +4 -0
- data/test/wwwjdic/parsers/test_key.rb +4 -0
- data/test/wwwjdic/parsers/test_server.rb +4 -0
- data/test/wwwjdic/test_application.rb +196 -148
- data/test/wwwjdic/test_parsable_duck_type.rb +4 -3
- data/test/wwwjdic/utils/test_downloader.rb +4 -0
- data/test/wwwjdic/utils/test_raisers.rb +42 -27
- data/wwwjdic.gemspec +14 -11
- metadata +19 -33
@@ -4,29 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Parsers::Key - wwwjdic
|
7
|
+
<title>class WWWJDic::Parsers::Key - wwwjdic 16.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
|
15
|
-
<script
|
16
|
-
<script
|
17
|
-
<script
|
18
|
-
<script
|
14
|
+
<script src="../../js/navigation.js" defer></script>
|
15
|
+
<script src="../../js/search.js" defer></script>
|
16
|
+
<script src="../../js/search_index.js" defer></script>
|
17
|
+
<script src="../../js/searcher.js" defer></script>
|
18
|
+
<script src="../../js/darkfish.js" defer></script>
|
19
19
|
|
20
20
|
<link href="../../css/fonts.css" rel="stylesheet">
|
21
21
|
<link href="../../css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
<body class="class" id="top" role="document">
|
24
|
+
<body id="top" role="document" class="class">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
29
|
-
<div
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
30
28
|
<h2>
|
31
29
|
<a href="../../index.html" rel="home">Home</a>
|
32
30
|
</h2>
|
@@ -38,69 +36,64 @@
|
|
38
36
|
</div>
|
39
37
|
</div>
|
40
38
|
|
41
|
-
<div
|
42
|
-
<form
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
43
41
|
<div id="search-field-wrapper">
|
44
|
-
<input
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
48
46
|
</div>
|
49
47
|
|
50
|
-
<ul
|
51
|
-
aria-
|
52
|
-
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
53
51
|
</form>
|
54
52
|
</div>
|
55
53
|
|
56
54
|
</div>
|
57
55
|
|
58
|
-
|
56
|
+
|
59
57
|
|
60
58
|
<div id="class-metadata">
|
61
|
-
|
62
|
-
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
63
62
|
<h3>Parent</h3>
|
64
63
|
|
65
|
-
|
66
64
|
<p class="link"><a href="../../Object.html">Object</a>
|
67
|
-
|
68
65
|
</div>
|
69
66
|
|
70
|
-
|
67
|
+
|
68
|
+
<div id="includes-section" class="nav-section">
|
71
69
|
<h3>Included Modules</h3>
|
72
70
|
|
73
71
|
<ul class="link-list">
|
74
|
-
|
75
|
-
|
76
72
|
<li><a class="include" href="../Utils/Raisers.html">WWWJDic::Utils::Raisers</a>
|
77
|
-
|
78
|
-
|
79
73
|
</ul>
|
80
74
|
</div>
|
81
75
|
|
82
|
-
|
83
|
-
|
84
|
-
|
76
|
+
|
77
|
+
|
78
|
+
<!-- Method Quickref -->
|
79
|
+
<div id="method-list-section" class="nav-section">
|
85
80
|
<h3>Methods</h3>
|
86
81
|
|
87
82
|
<ul class="link-list" role="directory">
|
88
|
-
|
89
83
|
<li ><a href="#method-i-parse">#parse</a>
|
90
|
-
|
91
84
|
</ul>
|
92
85
|
</div>
|
93
86
|
|
94
87
|
</div>
|
95
88
|
</nav>
|
96
89
|
|
97
|
-
<main aria-labelledby="class-WWWJDic::Parsers::Key"
|
98
|
-
<h1
|
90
|
+
<main role="main" aria-labelledby="class-WWWJDic::Parsers::Key">
|
91
|
+
<h1 id="class-WWWJDic::Parsers::Key" class="class">
|
99
92
|
class WWWJDic::Parsers::Key
|
100
93
|
</h1>
|
101
94
|
|
102
95
|
<section class="description">
|
103
|
-
|
96
|
+
|
104
97
|
<p>This class is an implementation of the Parsable duck type that checks the display type. The only needed parameter is the word to translate.</p>
|
105
98
|
|
106
99
|
<p>k is the key type:</p>
|
@@ -154,71 +147,52 @@
|
|
154
147
|
|
155
148
|
</section>
|
156
149
|
|
157
|
-
|
158
|
-
<section class="documentation-section" id="5Buntitled-5D">
|
159
|
-
|
160
|
-
|
150
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
161
151
|
|
162
152
|
|
163
153
|
|
164
154
|
|
165
155
|
|
166
|
-
|
167
|
-
|
168
|
-
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
156
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
169
157
|
<header>
|
170
158
|
<h3>Public Instance Methods</h3>
|
171
159
|
</header>
|
172
160
|
|
173
|
-
|
174
|
-
<div class="method-detail " id="method-i-parse">
|
175
|
-
|
161
|
+
<div id="method-i-parse" class="method-detail ">
|
176
162
|
<div class="method-heading">
|
177
163
|
<span class="method-name">parse</span><span
|
178
164
|
class="method-args">(value = :english)</span>
|
179
|
-
|
180
165
|
<span class="method-click-advice">click to toggle source</span>
|
181
|
-
|
182
166
|
</div>
|
183
167
|
|
184
|
-
|
185
168
|
<div class="method-description">
|
186
|
-
|
187
169
|
<p>The parsable duck type interface to every parser usage.</p>
|
188
170
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
171
|
<div class="method-source-code" id="parse-source">
|
193
172
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parsers/key.rb</span>
|
194
|
-
<span class="line-num">
|
195
|
-
<span class="line-num">
|
196
|
-
<span class="line-num">
|
197
|
-
<span class="line-num">
|
198
|
-
<span class="line-num">
|
199
|
-
<span class="line-num">
|
200
|
-
<span class="line-num">
|
201
|
-
<span class="line-num">
|
173
|
+
<span class="line-num">73</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">:english</span>)
|
174
|
+
<span class="line-num">74</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>
|
175
|
+
<span class="line-num">75</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>
|
176
|
+
<span class="line-num">76</span>
|
177
|
+
<span class="line-num">77</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">KEYS</span>.<span class="ruby-identifier">keys</span>)
|
178
|
+
<span class="line-num">78</span>
|
179
|
+
<span class="line-num">79</span> <span class="ruby-identifier">value</span>
|
180
|
+
<span class="line-num">80</span> <span class="ruby-keyword">end</span></pre>
|
202
181
|
</div>
|
203
|
-
|
204
182
|
</div>
|
205
183
|
|
206
184
|
|
207
|
-
|
208
|
-
|
209
185
|
</div>
|
210
186
|
|
211
|
-
|
212
187
|
</section>
|
213
188
|
|
214
189
|
</section>
|
215
|
-
|
216
190
|
</main>
|
217
191
|
|
218
192
|
|
219
193
|
<footer id="validator-badges" role="contentinfo">
|
220
194
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
221
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
195
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
222
196
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
223
197
|
</footer>
|
224
198
|
|
@@ -4,29 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Parsers::Search - wwwjdic
|
7
|
+
<title>class WWWJDic::Parsers::Search - wwwjdic 16.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
|
15
|
-
<script
|
16
|
-
<script
|
17
|
-
<script
|
18
|
-
<script
|
14
|
+
<script src="../../js/navigation.js" defer></script>
|
15
|
+
<script src="../../js/search.js" defer></script>
|
16
|
+
<script src="../../js/search_index.js" defer></script>
|
17
|
+
<script src="../../js/searcher.js" defer></script>
|
18
|
+
<script src="../../js/darkfish.js" defer></script>
|
19
19
|
|
20
20
|
<link href="../../css/fonts.css" rel="stylesheet">
|
21
21
|
<link href="../../css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
<body class="class" id="top" role="document">
|
24
|
+
<body id="top" role="document" class="class">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
29
|
-
<div
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
30
28
|
<h2>
|
31
29
|
<a href="../../index.html" rel="home">Home</a>
|
32
30
|
</h2>
|
@@ -38,58 +36,56 @@
|
|
38
36
|
</div>
|
39
37
|
</div>
|
40
38
|
|
41
|
-
<div
|
42
|
-
<form
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
43
41
|
<div id="search-field-wrapper">
|
44
|
-
<input
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
48
46
|
</div>
|
49
47
|
|
50
|
-
<ul
|
51
|
-
aria-
|
52
|
-
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
53
51
|
</form>
|
54
52
|
</div>
|
55
53
|
|
56
54
|
</div>
|
57
55
|
|
58
|
-
|
56
|
+
|
59
57
|
|
60
58
|
<div id="class-metadata">
|
61
|
-
|
62
|
-
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
63
62
|
<h3>Parent</h3>
|
64
63
|
|
65
|
-
|
66
64
|
<p class="link"><a href="../../Object.html">Object</a>
|
67
|
-
|
68
65
|
</div>
|
69
66
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
74
72
|
<h3>Methods</h3>
|
75
73
|
|
76
74
|
<ul class="link-list" role="directory">
|
77
|
-
|
78
75
|
<li ><a href="#method-i-parse">#parse</a>
|
79
|
-
|
80
76
|
</ul>
|
81
77
|
</div>
|
82
78
|
|
83
79
|
</div>
|
84
80
|
</nav>
|
85
81
|
|
86
|
-
<main aria-labelledby="class-WWWJDic::Parsers::Search"
|
87
|
-
<h1
|
82
|
+
<main role="main" aria-labelledby="class-WWWJDic::Parsers::Search">
|
83
|
+
<h1 id="class-WWWJDic::Parsers::Search" class="class">
|
88
84
|
class WWWJDic::Parsers::Search
|
89
85
|
</h1>
|
90
86
|
|
91
87
|
<section class="description">
|
92
|
-
|
88
|
+
|
93
89
|
<p>This class is an implementation of the Parsable duck type that checks the display type. The only needed parameter is the word to translate.</p>
|
94
90
|
|
95
91
|
<p>t is the search type:</p>
|
@@ -151,68 +147,49 @@
|
|
151
147
|
|
152
148
|
</section>
|
153
149
|
|
154
|
-
|
155
|
-
<section class="documentation-section" id="5Buntitled-5D">
|
156
|
-
|
157
|
-
|
158
|
-
|
150
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
159
151
|
|
160
152
|
|
161
153
|
|
162
154
|
|
163
155
|
|
164
|
-
|
165
|
-
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
156
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
166
157
|
<header>
|
167
158
|
<h3>Public Instance Methods</h3>
|
168
159
|
</header>
|
169
160
|
|
170
|
-
|
171
|
-
<div class="method-detail " id="method-i-parse">
|
172
|
-
|
161
|
+
<div id="method-i-parse" class="method-detail ">
|
173
162
|
<div class="method-heading">
|
174
163
|
<span class="method-name">parse</span><span
|
175
164
|
class="method-args">(value = '')</span>
|
176
|
-
|
177
165
|
<span class="method-click-advice">click to toggle source</span>
|
178
|
-
|
179
166
|
</div>
|
180
167
|
|
181
|
-
|
182
168
|
<div class="method-description">
|
183
|
-
|
184
169
|
<p>The parsable duck type interface to every parser usage.</p>
|
185
170
|
|
186
|
-
|
187
|
-
|
188
|
-
|
189
171
|
<div class="method-source-code" id="parse-source">
|
190
172
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parsers/search.rb</span>
|
191
|
-
<span class="line-num">
|
192
|
-
<span class="line-num">
|
193
|
-
<span class="line-num">
|
194
|
-
<span class="line-num">
|
195
|
-
<span class="line-num">
|
173
|
+
<span class="line-num">62</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">''</span>)
|
174
|
+
<span class="line-num">63</span> <span class="ruby-keyword">return</span> <span class="ruby-string">'D'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">==</span> <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-identifier">value</span>).<span class="ruby-identifier">to_s</span>
|
175
|
+
<span class="line-num">64</span>
|
176
|
+
<span class="line-num">65</span> <span class="ruby-string">'U'</span>
|
177
|
+
<span class="line-num">66</span> <span class="ruby-keyword">end</span></pre>
|
196
178
|
</div>
|
197
|
-
|
198
179
|
</div>
|
199
180
|
|
200
181
|
|
201
|
-
|
202
|
-
|
203
182
|
</div>
|
204
183
|
|
205
|
-
|
206
184
|
</section>
|
207
185
|
|
208
186
|
</section>
|
209
|
-
|
210
187
|
</main>
|
211
188
|
|
212
189
|
|
213
190
|
<footer id="validator-badges" role="contentinfo">
|
214
191
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
215
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
192
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
216
193
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
217
194
|
</footer>
|
218
195
|
|
@@ -4,29 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Parsers::Server - wwwjdic
|
7
|
+
<title>class WWWJDic::Parsers::Server - wwwjdic 16.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
|
15
|
-
<script
|
16
|
-
<script
|
17
|
-
<script
|
18
|
-
<script
|
14
|
+
<script src="../../js/navigation.js" defer></script>
|
15
|
+
<script src="../../js/search.js" defer></script>
|
16
|
+
<script src="../../js/search_index.js" defer></script>
|
17
|
+
<script src="../../js/searcher.js" defer></script>
|
18
|
+
<script src="../../js/darkfish.js" defer></script>
|
19
19
|
|
20
20
|
<link href="../../css/fonts.css" rel="stylesheet">
|
21
21
|
<link href="../../css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
<body class="class" id="top" role="document">
|
24
|
+
<body id="top" role="document" class="class">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
29
|
-
<div
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
30
28
|
<h2>
|
31
29
|
<a href="../../index.html" rel="home">Home</a>
|
32
30
|
</h2>
|
@@ -38,69 +36,64 @@
|
|
38
36
|
</div>
|
39
37
|
</div>
|
40
38
|
|
41
|
-
<div
|
42
|
-
<form
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
43
41
|
<div id="search-field-wrapper">
|
44
|
-
<input
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
48
46
|
</div>
|
49
47
|
|
50
|
-
<ul
|
51
|
-
aria-
|
52
|
-
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
53
51
|
</form>
|
54
52
|
</div>
|
55
53
|
|
56
54
|
</div>
|
57
55
|
|
58
|
-
|
56
|
+
|
59
57
|
|
60
58
|
<div id="class-metadata">
|
61
|
-
|
62
|
-
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
63
62
|
<h3>Parent</h3>
|
64
63
|
|
65
|
-
|
66
64
|
<p class="link"><a href="../../Object.html">Object</a>
|
67
|
-
|
68
65
|
</div>
|
69
66
|
|
70
|
-
|
67
|
+
|
68
|
+
<div id="includes-section" class="nav-section">
|
71
69
|
<h3>Included Modules</h3>
|
72
70
|
|
73
71
|
<ul class="link-list">
|
74
|
-
|
75
|
-
|
76
72
|
<li><a class="include" href="../Utils/Raisers.html">WWWJDic::Utils::Raisers</a>
|
77
|
-
|
78
|
-
|
79
73
|
</ul>
|
80
74
|
</div>
|
81
75
|
|
82
|
-
|
83
|
-
|
84
|
-
|
76
|
+
|
77
|
+
|
78
|
+
<!-- Method Quickref -->
|
79
|
+
<div id="method-list-section" class="nav-section">
|
85
80
|
<h3>Methods</h3>
|
86
81
|
|
87
82
|
<ul class="link-list" role="directory">
|
88
|
-
|
89
83
|
<li ><a href="#method-i-parse">#parse</a>
|
90
|
-
|
91
84
|
</ul>
|
92
85
|
</div>
|
93
86
|
|
94
87
|
</div>
|
95
88
|
</nav>
|
96
89
|
|
97
|
-
<main aria-labelledby="class-WWWJDic::Parsers::Server"
|
98
|
-
<h1
|
90
|
+
<main role="main" aria-labelledby="class-WWWJDic::Parsers::Server">
|
91
|
+
<h1 id="class-WWWJDic::Parsers::Server" class="class">
|
99
92
|
class WWWJDic::Parsers::Server
|
100
93
|
</h1>
|
101
94
|
|
102
95
|
<section class="description">
|
103
|
-
|
96
|
+
|
104
97
|
<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
98
|
<dl class="rdoc-list note-list"><dt>Author
|
106
99
|
<dd>
|
@@ -115,71 +108,52 @@
|
|
115
108
|
|
116
109
|
</section>
|
117
110
|
|
118
|
-
|
119
|
-
<section class="documentation-section" id="5Buntitled-5D">
|
120
|
-
|
121
|
-
|
111
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
122
112
|
|
123
113
|
|
124
114
|
|
125
115
|
|
126
116
|
|
127
|
-
|
128
|
-
|
129
|
-
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
117
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
130
118
|
<header>
|
131
119
|
<h3>Public Instance Methods</h3>
|
132
120
|
</header>
|
133
121
|
|
134
|
-
|
135
|
-
<div class="method-detail " id="method-i-parse">
|
136
|
-
|
122
|
+
<div id="method-i-parse" class="method-detail ">
|
137
123
|
<div class="method-heading">
|
138
124
|
<span class="method-name">parse</span><span
|
139
125
|
class="method-args">(value = :edrdg)</span>
|
140
|
-
|
141
126
|
<span class="method-click-advice">click to toggle source</span>
|
142
|
-
|
143
127
|
</div>
|
144
128
|
|
145
|
-
|
146
129
|
<div class="method-description">
|
147
|
-
|
148
130
|
<p>The parsable duck type interface to every parser usage.</p>
|
149
131
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
132
|
<div class="method-source-code" id="parse-source">
|
154
133
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parsers/server.rb</span>
|
155
|
-
<span class="line-num">
|
156
|
-
<span class="line-num">
|
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">
|
134
|
+
<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">:edrdg</span>)
|
135
|
+
<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>
|
136
|
+
<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>
|
137
|
+
<span class="line-num">47</span>
|
138
|
+
<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">URIS</span>.<span class="ruby-identifier">keys</span>)
|
139
|
+
<span class="line-num">49</span>
|
140
|
+
<span class="line-num">50</span> <span class="ruby-identifier">value</span>
|
141
|
+
<span class="line-num">51</span> <span class="ruby-keyword">end</span></pre>
|
163
142
|
</div>
|
164
|
-
|
165
143
|
</div>
|
166
144
|
|
167
145
|
|
168
|
-
|
169
|
-
|
170
146
|
</div>
|
171
147
|
|
172
|
-
|
173
148
|
</section>
|
174
149
|
|
175
150
|
</section>
|
176
|
-
|
177
151
|
</main>
|
178
152
|
|
179
153
|
|
180
154
|
<footer id="validator-badges" role="contentinfo">
|
181
155
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
182
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
156
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
183
157
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
184
158
|
</footer>
|
185
159
|
|