wwwjdic 16.0.0 → 16.1.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 +10 -1
- data/Gemfile +2 -4
- data/README.md +5 -4
- data/Rakefile +2 -4
- data/copyright.md +5 -5
- data/examples/basics.rb +2 -4
- data/examples/translate.rb +2 -4
- data/examples/uri.rb +2 -6
- data/html/CHANGELOG.html +34 -24
- data/html/COPYING_md.html +22 -23
- data/html/Gemfile.html +23 -24
- data/html/Object.html +393 -394
- data/html/README_md.html +27 -28
- data/html/Rakefile.html +23 -24
- data/html/WWWJDic.html +42 -43
- data/html/WWWJDic/ParsableDuckType.html +35 -36
- data/html/WWWJDic/Parser.html +47 -48
- data/html/WWWJDic/Parsers.html +28 -29
- data/html/WWWJDic/Parsers/Dict.html +47 -48
- data/html/WWWJDic/Parsers/Display.html +42 -43
- data/html/WWWJDic/Parsers/Key.html +42 -43
- data/html/WWWJDic/Parsers/Search.html +38 -39
- data/html/WWWJDic/Parsers/Server.html +42 -43
- data/html/WWWJDic/Splitter.html +76 -77
- data/html/WWWJDic/Utils.html +29 -30
- data/html/WWWJDic/Utils/Downloader.html +40 -35
- data/html/WWWJDic/Utils/Downloader/Downloader.html +52 -45
- data/html/WWWJDic/Utils/Raisers.html +43 -44
- data/html/WWWJDic/WWWJDic.html +162 -163
- data/html/copyright_md.html +27 -28
- data/html/created.rid +33 -33
- data/html/css/rdoc.css +638 -619
- data/html/index.html +26 -27
- data/html/js/darkfish.js +84 -84
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +109 -110
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +228 -229
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +10 -10
- data/lib/wwwjdic.rb +3 -5
- data/lib/wwwjdic/application.rb +4 -5
- data/lib/wwwjdic/constants.rb +11 -5
- data/lib/wwwjdic/locales/de.yml +2 -2
- data/lib/wwwjdic/locales/en.yml +2 -2
- data/lib/wwwjdic/locales/es.yml +2 -2
- data/lib/wwwjdic/locales/fr.yml +2 -2
- data/lib/wwwjdic/locales/hu.yml +2 -2
- data/lib/wwwjdic/locales/it.yml +2 -2
- data/lib/wwwjdic/locales/ja.yml +4 -4
- data/lib/wwwjdic/locales/nl.yml +2 -2
- data/lib/wwwjdic/locales/ru.yml +2 -2
- data/lib/wwwjdic/locales/sl.yml +2 -2
- data/lib/wwwjdic/locales/sv.yml +2 -2
- data/lib/wwwjdic/parser.rb +3 -5
- data/lib/wwwjdic/parsers/dict.rb +3 -5
- data/lib/wwwjdic/parsers/display.rb +3 -5
- data/lib/wwwjdic/parsers/key.rb +3 -5
- data/lib/wwwjdic/parsers/search.rb +3 -5
- data/lib/wwwjdic/parsers/server.rb +3 -5
- data/lib/wwwjdic/utils/downloader.rb +14 -8
- data/lib/wwwjdic/utils/raisers.rb +4 -6
- data/lib/wwwjdic/utils/splitter.rb +4 -5
- data/lib/wwwjdic/version.rb +10 -4
- data/test/test_helper.rb +2 -4
- data/test/test_wwwjdic.rb +2 -4
- data/test/wwwjdic/locales/de.yml +2 -2
- data/test/wwwjdic/locales/en.yml +2 -2
- data/test/wwwjdic/locales/es.yml +2 -2
- data/test/wwwjdic/locales/fr.yml +2 -2
- data/test/wwwjdic/locales/hu.yml +2 -2
- data/test/wwwjdic/locales/it.yml +2 -2
- data/test/wwwjdic/locales/ja.yml +4 -4
- data/test/wwwjdic/locales/nl.yml +2 -2
- data/test/wwwjdic/locales/ru.yml +2 -2
- data/test/wwwjdic/locales/sl.yml +2 -2
- data/test/wwwjdic/locales/sv.yml +2 -2
- data/test/wwwjdic/locales/test_locales.rb +2 -4
- data/test/wwwjdic/parsers/test_dict.rb +2 -4
- data/test/wwwjdic/parsers/test_display.rb +2 -4
- data/test/wwwjdic/parsers/test_key.rb +2 -4
- data/test/wwwjdic/parsers/test_server.rb +2 -4
- data/test/wwwjdic/test_application.rb +3 -5
- data/test/wwwjdic/test_parsable_duck_type.rb +4 -5
- data/test/wwwjdic/utils/test_downloader.rb +2 -4
- data/test/wwwjdic/utils/test_raisers.rb +2 -4
- data/wwwjdic.gemspec +2 -4
- metadata +11 -11
data/html/WWWJDic/Parser.html
CHANGED
@@ -4,27 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Parser - wwwjdic 16.
|
7
|
+
<title>class WWWJDic::Parser - wwwjdic 16.1.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">
|
22
22
|
|
23
23
|
|
24
|
-
<body id="top" role="document"
|
24
|
+
<body class="class" id="top" role="document">
|
25
25
|
<nav role="navigation">
|
26
26
|
<div id="project-navigation">
|
27
|
-
<div id="home-section" role="region" title="Quick navigation"
|
27
|
+
<div class="nav-section" id="home-section" role="region" title="Quick navigation">
|
28
28
|
<h2>
|
29
29
|
<a href="../index.html" rel="home">Home</a>
|
30
30
|
</h2>
|
@@ -36,39 +36,39 @@
|
|
36
36
|
</div>
|
37
37
|
</div>
|
38
38
|
|
39
|
-
<div
|
40
|
-
<form action="#" method="get"
|
39
|
+
<div class="project-section initially-hidden" id="search-section" role="search">
|
40
|
+
<form accept-charset="utf-8" action="#" method="get">
|
41
41
|
<div id="search-field-wrapper">
|
42
|
-
<input
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
<input aria-autocomplete="list" aria-controls="search-results" aria-label="Search"
|
43
|
+
id="search-field" name="search"
|
44
|
+
placeholder="Search" role="combobox" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"
|
45
|
+
type="text">
|
46
46
|
</div>
|
47
47
|
|
48
|
-
<ul
|
49
|
-
aria-
|
50
|
-
|
48
|
+
<ul aria-atomic="false" aria-busy="false"
|
49
|
+
aria-expanded="false" aria-label="Search Results"
|
50
|
+
class="initially-hidden" id="search-results"></ul>
|
51
51
|
</form>
|
52
52
|
</div>
|
53
53
|
|
54
54
|
</div>
|
55
55
|
|
56
|
-
|
56
|
+
|
57
57
|
|
58
58
|
<div id="class-metadata">
|
59
|
-
|
60
|
-
|
61
|
-
<div
|
59
|
+
|
60
|
+
|
61
|
+
<div class="nav-section" id="parent-class-section">
|
62
62
|
<h3>Parent</h3>
|
63
63
|
|
64
64
|
<p class="link"><a href="../Object.html">Object</a>
|
65
65
|
</div>
|
66
66
|
|
67
|
-
|
68
|
-
|
69
|
-
|
67
|
+
|
68
|
+
|
69
|
+
|
70
70
|
<!-- Method Quickref -->
|
71
|
-
<div
|
71
|
+
<div class="nav-section" id="method-list-section">
|
72
72
|
<h3>Methods</h3>
|
73
73
|
|
74
74
|
<ul class="link-list" role="directory">
|
@@ -80,20 +80,20 @@
|
|
80
80
|
</div>
|
81
81
|
</nav>
|
82
82
|
|
83
|
-
<main
|
84
|
-
<h1 id="class-WWWJDic::Parser"
|
83
|
+
<main aria-labelledby="class-WWWJDic::Parser" role="main">
|
84
|
+
<h1 class="class" id="class-WWWJDic::Parser">
|
85
85
|
class WWWJDic::Parser
|
86
86
|
</h1>
|
87
87
|
|
88
88
|
<section class="description">
|
89
|
-
|
89
|
+
|
90
90
|
<p>This class is a simple utility that is used to <a href="Parser.html#method-i-parse"><code>parse</code></a> and filter parameters for wwwjdic.</p>
|
91
91
|
<dl class="rdoc-list note-list"><dt>Author
|
92
92
|
<dd>
|
93
93
|
<p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p>
|
94
94
|
</dd><dt>Copyright
|
95
95
|
<dd>
|
96
|
-
<p
|
96
|
+
<p>© 2014-2021 Marco Bresciani</p>
|
97
97
|
</dd><dt>License
|
98
98
|
<dd>
|
99
99
|
<p>GNU General Public License version 3</p>
|
@@ -101,7 +101,7 @@
|
|
101
101
|
|
102
102
|
</section>
|
103
103
|
|
104
|
-
<section
|
104
|
+
<section class="documentation-section" id="5Buntitled-5D">
|
105
105
|
|
106
106
|
|
107
107
|
|
@@ -110,25 +110,25 @@
|
|
110
110
|
<h3>Attributes</h3>
|
111
111
|
</header>
|
112
112
|
|
113
|
-
<div id="attribute-i-parsers"
|
113
|
+
<div class="method-detail" id="attribute-i-parsers">
|
114
114
|
<div class="method-heading attribute-method-heading">
|
115
115
|
<span class="method-name">parsers</span><span
|
116
116
|
class="attribute-access-type">[R]</span>
|
117
117
|
</div>
|
118
118
|
|
119
119
|
<div class="method-description">
|
120
|
-
|
120
|
+
|
121
121
|
</div>
|
122
122
|
</div>
|
123
123
|
</section>
|
124
124
|
|
125
125
|
|
126
|
-
<section id="public-class-5Buntitled-5D-method-details"
|
126
|
+
<section class="method-section" id="public-class-5Buntitled-5D-method-details">
|
127
127
|
<header>
|
128
128
|
<h3>Public Class Methods</h3>
|
129
129
|
</header>
|
130
130
|
|
131
|
-
<div
|
131
|
+
<div class="method-detail " id="method-c-new">
|
132
132
|
<div class="method-heading">
|
133
133
|
<span class="method-name">new</span><span
|
134
134
|
class="method-args">(args = {})</span>
|
@@ -136,14 +136,14 @@
|
|
136
136
|
</div>
|
137
137
|
|
138
138
|
<div class="method-description">
|
139
|
-
|
139
|
+
|
140
140
|
|
141
141
|
<div class="method-source-code" id="new-source">
|
142
142
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parser.rb</span>
|
143
|
-
<span class="line-num">
|
144
|
-
<span class="line-num">
|
145
|
-
<span class="line-num">
|
146
|
-
<span class="line-num">
|
143
|
+
<span class="line-num">39</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">args</span> = {})
|
144
|
+
<span class="line-num">40</span> <span class="ruby-ivar">@parsers</span> = {}
|
145
|
+
<span class="line-num">41</span> <span class="ruby-constant">ALL_PARAMS</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">param</span><span class="ruby-operator">|</span> <span class="ruby-identifier">parsers</span>[<span class="ruby-identifier">param</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">param</span>] } <span class="ruby-keyword">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">nil?</span>
|
146
|
+
<span class="line-num">42</span> <span class="ruby-keyword">end</span></pre>
|
147
147
|
</div>
|
148
148
|
</div>
|
149
149
|
|
@@ -152,12 +152,12 @@
|
|
152
152
|
|
153
153
|
</section>
|
154
154
|
|
155
|
-
<section id="public-instance-5Buntitled-5D-method-details"
|
155
|
+
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
156
156
|
<header>
|
157
157
|
<h3>Public Instance Methods</h3>
|
158
158
|
</header>
|
159
159
|
|
160
|
-
<div
|
160
|
+
<div class="method-detail " id="method-i-parse">
|
161
161
|
<div class="method-heading">
|
162
162
|
<span class="method-name">parse</span><span
|
163
163
|
class="method-args">(method = nil, params = nil)</span>
|
@@ -169,11 +169,11 @@
|
|
169
169
|
|
170
170
|
<div class="method-source-code" id="parse-source">
|
171
171
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parser.rb</span>
|
172
|
-
<span class="line-num">
|
173
|
-
<span class="line-num">
|
174
|
-
<span class="line-num">
|
175
|
-
<span class="line-num">
|
176
|
-
<span class="line-num">
|
172
|
+
<span class="line-num">45</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse</span>(<span class="ruby-identifier">method</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">params</span> = <span class="ruby-keyword">nil</span>)
|
173
|
+
<span class="line-num">46</span> <span class="ruby-identifier">a_parser</span> = <span class="ruby-keyword">nil</span>
|
174
|
+
<span class="line-num">47</span> <span class="ruby-identifier">a_parser</span> = <span class="ruby-identifier">parsers</span>[<span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_sym</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">method</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">parsers</span>.<span class="ruby-identifier">nil?</span>
|
175
|
+
<span class="line-num">48</span> <span class="ruby-identifier">a_parser</span>&.<span class="ruby-identifier">parse</span> <span class="ruby-identifier">params</span>
|
176
|
+
<span class="line-num">49</span> <span class="ruby-keyword">end</span></pre>
|
177
177
|
</div>
|
178
178
|
</div>
|
179
179
|
|
@@ -188,7 +188,6 @@
|
|
188
188
|
|
189
189
|
<footer id="validator-badges" role="contentinfo">
|
190
190
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
191
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.
|
191
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.2.
|
192
192
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
193
193
|
</footer>
|
194
|
-
|
data/html/WWWJDic/Parsers.html
CHANGED
@@ -4,27 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>module WWWJDic::Parsers - wwwjdic 16.
|
7
|
+
<title>module WWWJDic::Parsers - wwwjdic 16.1.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">
|
22
22
|
|
23
23
|
|
24
|
-
<body id="top" role="document"
|
24
|
+
<body class="module" id="top" role="document">
|
25
25
|
<nav role="navigation">
|
26
26
|
<div id="project-navigation">
|
27
|
-
<div id="home-section" role="region" title="Quick navigation"
|
27
|
+
<div class="nav-section" id="home-section" role="region" title="Quick navigation">
|
28
28
|
<h2>
|
29
29
|
<a href="../index.html" rel="home">Home</a>
|
30
30
|
</h2>
|
@@ -36,44 +36,44 @@
|
|
36
36
|
</div>
|
37
37
|
</div>
|
38
38
|
|
39
|
-
<div
|
40
|
-
<form action="#" method="get"
|
39
|
+
<div class="project-section initially-hidden" id="search-section" role="search">
|
40
|
+
<form accept-charset="utf-8" action="#" method="get">
|
41
41
|
<div id="search-field-wrapper">
|
42
|
-
<input
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
<input aria-autocomplete="list" aria-controls="search-results" aria-label="Search"
|
43
|
+
id="search-field" name="search"
|
44
|
+
placeholder="Search" role="combobox" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"
|
45
|
+
type="text">
|
46
46
|
</div>
|
47
47
|
|
48
|
-
<ul
|
49
|
-
aria-
|
50
|
-
|
48
|
+
<ul aria-atomic="false" aria-busy="false"
|
49
|
+
aria-expanded="false" aria-label="Search Results"
|
50
|
+
class="initially-hidden" id="search-results"></ul>
|
51
51
|
</form>
|
52
52
|
</div>
|
53
53
|
|
54
54
|
</div>
|
55
55
|
|
56
|
-
|
56
|
+
|
57
57
|
|
58
58
|
<div id="class-metadata">
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
64
|
</div>
|
65
65
|
</nav>
|
66
66
|
|
67
|
-
<main
|
68
|
-
<h1 id="module-WWWJDic::Parsers"
|
67
|
+
<main aria-labelledby="module-WWWJDic::Parsers" role="main">
|
68
|
+
<h1 class="module" id="module-WWWJDic::Parsers">
|
69
69
|
module WWWJDic::Parsers
|
70
70
|
</h1>
|
71
71
|
|
72
72
|
<section class="description">
|
73
|
-
|
73
|
+
|
74
74
|
</section>
|
75
75
|
|
76
|
-
<section
|
76
|
+
<section class="documentation-section" id="5Buntitled-5D">
|
77
77
|
|
78
78
|
|
79
79
|
|
@@ -85,7 +85,6 @@
|
|
85
85
|
|
86
86
|
<footer id="validator-badges" role="contentinfo">
|
87
87
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
88
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.
|
88
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.2.
|
89
89
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
90
90
|
</footer>
|
91
|
-
|
@@ -4,27 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Parsers::Dict - wwwjdic 16.
|
7
|
+
<title>class WWWJDic::Parsers::Dict - wwwjdic 16.1.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">
|
22
22
|
|
23
23
|
|
24
|
-
<body id="top" role="document"
|
24
|
+
<body class="class" id="top" role="document">
|
25
25
|
<nav role="navigation">
|
26
26
|
<div id="project-navigation">
|
27
|
-
<div id="home-section" role="region" title="Quick navigation"
|
27
|
+
<div class="nav-section" id="home-section" role="region" title="Quick navigation">
|
28
28
|
<h2>
|
29
29
|
<a href="../../index.html" rel="home">Home</a>
|
30
30
|
</h2>
|
@@ -36,36 +36,36 @@
|
|
36
36
|
</div>
|
37
37
|
</div>
|
38
38
|
|
39
|
-
<div
|
40
|
-
<form action="#" method="get"
|
39
|
+
<div class="project-section initially-hidden" id="search-section" role="search">
|
40
|
+
<form accept-charset="utf-8" action="#" method="get">
|
41
41
|
<div id="search-field-wrapper">
|
42
|
-
<input
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
<input aria-autocomplete="list" aria-controls="search-results" aria-label="Search"
|
43
|
+
id="search-field" name="search"
|
44
|
+
placeholder="Search" role="combobox" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"
|
45
|
+
type="text">
|
46
46
|
</div>
|
47
47
|
|
48
|
-
<ul
|
49
|
-
aria-
|
50
|
-
|
48
|
+
<ul aria-atomic="false" aria-busy="false"
|
49
|
+
aria-expanded="false" aria-label="Search Results"
|
50
|
+
class="initially-hidden" id="search-results"></ul>
|
51
51
|
</form>
|
52
52
|
</div>
|
53
53
|
|
54
54
|
</div>
|
55
55
|
|
56
|
-
|
56
|
+
|
57
57
|
|
58
58
|
<div id="class-metadata">
|
59
|
-
|
60
|
-
|
61
|
-
<div
|
59
|
+
|
60
|
+
|
61
|
+
<div class="nav-section" id="parent-class-section">
|
62
62
|
<h3>Parent</h3>
|
63
63
|
|
64
64
|
<p class="link"><a href="../../Object.html">Object</a>
|
65
65
|
</div>
|
66
66
|
|
67
|
-
|
68
|
-
<div
|
67
|
+
|
68
|
+
<div class="nav-section" id="includes-section">
|
69
69
|
<h3>Included Modules</h3>
|
70
70
|
|
71
71
|
<ul class="link-list">
|
@@ -73,10 +73,10 @@
|
|
73
73
|
</ul>
|
74
74
|
</div>
|
75
75
|
|
76
|
-
|
77
|
-
|
76
|
+
|
77
|
+
|
78
78
|
<!-- Method Quickref -->
|
79
|
-
<div
|
79
|
+
<div class="nav-section" id="method-list-section">
|
80
80
|
<h3>Methods</h3>
|
81
81
|
|
82
82
|
<ul class="link-list" role="directory">
|
@@ -87,13 +87,13 @@
|
|
87
87
|
</div>
|
88
88
|
</nav>
|
89
89
|
|
90
|
-
<main
|
91
|
-
<h1 id="class-WWWJDic::Parsers::Dict"
|
90
|
+
<main aria-labelledby="class-WWWJDic::Parsers::Dict" role="main">
|
91
|
+
<h1 class="class" id="class-WWWJDic::Parsers::Dict">
|
92
92
|
class WWWJDic::Parsers::Dict
|
93
93
|
</h1>
|
94
94
|
|
95
95
|
<section class="description">
|
96
|
-
|
96
|
+
|
97
97
|
<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>
|
98
98
|
|
99
99
|
<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>
|
@@ -102,7 +102,7 @@
|
|
102
102
|
<p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p>
|
103
103
|
</dd><dt>Copyright
|
104
104
|
<dd>
|
105
|
-
<p
|
105
|
+
<p>© 2014-2021 Marco Bresciani</p>
|
106
106
|
</dd><dt>License
|
107
107
|
<dd>
|
108
108
|
<p>GNU General Public License version 3</p>
|
@@ -110,18 +110,18 @@
|
|
110
110
|
|
111
111
|
</section>
|
112
112
|
|
113
|
-
<section
|
113
|
+
<section class="documentation-section" id="5Buntitled-5D">
|
114
114
|
|
115
115
|
|
116
116
|
|
117
117
|
|
118
118
|
|
119
|
-
<section id="public-instance-5Buntitled-5D-method-details"
|
119
|
+
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
120
120
|
<header>
|
121
121
|
<h3>Public Instance Methods</h3>
|
122
122
|
</header>
|
123
123
|
|
124
|
-
<div
|
124
|
+
<div class="method-detail " id="method-i-parse">
|
125
125
|
<div class="method-heading">
|
126
126
|
<span class="method-name">parse</span><span
|
127
127
|
class="method-args">(value = '1')</span>
|
@@ -133,19 +133,19 @@
|
|
133
133
|
|
134
134
|
<div class="method-source-code" id="parse-source">
|
135
135
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parsers/dict.rb</span>
|
136
|
-
<span class="line-num">
|
137
|
-
<span class="line-num">
|
138
|
-
<span class="line-num">
|
139
|
-
<span class="line-num">
|
140
|
-
<span class="line-num">
|
141
|
-
<span class="line-num">
|
142
|
-
<span class="line-num">
|
143
|
-
<span class="line-num">
|
144
|
-
<span class="line-num">
|
145
|
-
<span class="line-num">
|
146
|
-
<span class="line-num">
|
147
|
-
<span class="line-num">
|
148
|
-
<span class="line-num">
|
136
|
+
<span class="line-num">46</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>)
|
137
|
+
<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.nil'</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
|
138
|
+
<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">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:length</span>
|
139
|
+
<span class="line-num">49</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>
|
140
|
+
<span class="line-num">50</span>
|
141
|
+
<span class="line-num">51</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>
|
142
|
+
<span class="line-num">52</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>)
|
143
|
+
<span class="line-num">53</span> <span class="ruby-identifier">value</span>
|
144
|
+
<span class="line-num">54</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>
|
145
|
+
<span class="line-num">55</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>)
|
146
|
+
<span class="line-num">56</span> <span class="ruby-constant">DICTS_BY_NAMES</span>[<span class="ruby-identifier">value</span>]
|
147
|
+
<span class="line-num">57</span> <span class="ruby-keyword">end</span>
|
148
|
+
<span class="line-num">58</span> <span class="ruby-keyword">end</span></pre>
|
149
149
|
</div>
|
150
150
|
</div>
|
151
151
|
|
@@ -160,7 +160,6 @@
|
|
160
160
|
|
161
161
|
<footer id="validator-badges" role="contentinfo">
|
162
162
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
163
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.
|
163
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.2.
|
164
164
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
165
165
|
</footer>
|
166
|
-
|