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
data/html/WWWJDic/Parsers.html
CHANGED
@@ -4,29 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>module WWWJDic::Parsers - wwwjdic
|
7
|
+
<title>module WWWJDic::Parsers - 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="module" id="top" role="document">
|
24
|
+
<body id="top" role="document" class="module">
|
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,62 +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
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
66
64
|
</div>
|
67
65
|
</nav>
|
68
66
|
|
69
|
-
<main aria-labelledby="module-WWWJDic::Parsers"
|
70
|
-
<h1
|
67
|
+
<main role="main" aria-labelledby="module-WWWJDic::Parsers">
|
68
|
+
<h1 id="module-WWWJDic::Parsers" class="module">
|
71
69
|
module WWWJDic::Parsers
|
72
70
|
</h1>
|
73
71
|
|
74
72
|
<section class="description">
|
75
|
-
|
73
|
+
|
76
74
|
</section>
|
77
75
|
|
78
|
-
|
79
|
-
<section class="documentation-section" id="5Buntitled-5D">
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
76
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
84
77
|
|
85
78
|
|
86
79
|
|
87
80
|
|
88
81
|
|
89
82
|
</section>
|
90
|
-
|
91
83
|
</main>
|
92
84
|
|
93
85
|
|
94
86
|
<footer id="validator-badges" role="contentinfo">
|
95
87
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
96
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
88
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
97
89
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
98
90
|
</footer>
|
99
91
|
|
@@ -4,29 +4,27 @@
|
|
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 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::Dict"
|
98
|
-
<h1
|
90
|
+
<main role="main" aria-labelledby="class-WWWJDic::Parsers::Dict">
|
91
|
+
<h1 id="class-WWWJDic::Parsers::Dict" class="class">
|
99
92
|
class WWWJDic::Parsers::Dict
|
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 dictionary type. The only needed parameter is a valid dictionary.</p>
|
105
98
|
|
106
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>
|
@@ -117,76 +110,57 @@
|
|
117
110
|
|
118
111
|
</section>
|
119
112
|
|
120
|
-
|
121
|
-
<section class="documentation-section" id="5Buntitled-5D">
|
122
|
-
|
123
|
-
|
113
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
124
114
|
|
125
115
|
|
126
116
|
|
127
117
|
|
128
118
|
|
129
|
-
|
130
|
-
|
131
|
-
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
119
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
132
120
|
<header>
|
133
121
|
<h3>Public Instance Methods</h3>
|
134
122
|
</header>
|
135
123
|
|
136
|
-
|
137
|
-
<div class="method-detail " id="method-i-parse">
|
138
|
-
|
124
|
+
<div id="method-i-parse" class="method-detail ">
|
139
125
|
<div class="method-heading">
|
140
126
|
<span class="method-name">parse</span><span
|
141
127
|
class="method-args">(value = '1')</span>
|
142
|
-
|
143
128
|
<span class="method-click-advice">click to toggle source</span>
|
144
|
-
|
145
129
|
</div>
|
146
130
|
|
147
|
-
|
148
131
|
<div class="method-description">
|
149
|
-
|
150
132
|
<p>The parsable duck type interface to every parser usage.</p>
|
151
133
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
134
|
<div class="method-source-code" id="parse-source">
|
156
135
|
<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">
|
136
|
+
<span class="line-num">48</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">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.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">50</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">51</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">52</span>
|
141
|
+
<span class="line-num">53</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">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_CODES</span>)
|
143
|
+
<span class="line-num">55</span> <span class="ruby-identifier">value</span>
|
144
|
+
<span class="line-num">56</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">57</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">58</span> <span class="ruby-constant">DICTS_BY_NAMES</span>[<span class="ruby-identifier">value</span>]
|
147
|
+
<span class="line-num">59</span> <span class="ruby-keyword">end</span>
|
148
|
+
<span class="line-num">60</span> <span class="ruby-keyword">end</span></pre>
|
170
149
|
</div>
|
171
|
-
|
172
150
|
</div>
|
173
151
|
|
174
152
|
|
175
|
-
|
176
|
-
|
177
153
|
</div>
|
178
154
|
|
179
|
-
|
180
155
|
</section>
|
181
156
|
|
182
157
|
</section>
|
183
|
-
|
184
158
|
</main>
|
185
159
|
|
186
160
|
|
187
161
|
<footer id="validator-badges" role="contentinfo">
|
188
162
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
189
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
163
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
190
164
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
191
165
|
</footer>
|
192
166
|
|
@@ -4,29 +4,27 @@
|
|
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 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::Display"
|
98
|
-
<h1
|
90
|
+
<main role="main" aria-labelledby="class-WWWJDic::Parsers::Display">
|
91
|
+
<h1 id="class-WWWJDic::Parsers::Display" class="class">
|
99
92
|
class WWWJDic::Parsers::Display
|
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
|
|
106
99
|
<p>M = backdoor entry (regular display) or Z = backdoor entry (raw dictionary display)</p>
|
@@ -117,71 +110,52 @@
|
|
117
110
|
|
118
111
|
</section>
|
119
112
|
|
120
|
-
|
121
|
-
<section class="documentation-section" id="5Buntitled-5D">
|
122
|
-
|
123
|
-
|
113
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
124
114
|
|
125
115
|
|
126
116
|
|
127
117
|
|
128
118
|
|
129
|
-
|
130
|
-
|
131
|
-
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
119
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
132
120
|
<header>
|
133
121
|
<h3>Public Instance Methods</h3>
|
134
122
|
</header>
|
135
123
|
|
136
|
-
|
137
|
-
<div class="method-detail " id="method-i-parse">
|
138
|
-
|
124
|
+
<div id="method-i-parse" class="method-detail ">
|
139
125
|
<div class="method-heading">
|
140
126
|
<span class="method-name">parse</span><span
|
141
127
|
class="method-args">(value = :display)</span>
|
142
|
-
|
143
128
|
<span class="method-click-advice">click to toggle source</span>
|
144
|
-
|
145
129
|
</div>
|
146
130
|
|
147
|
-
|
148
131
|
<div class="method-description">
|
149
|
-
|
150
132
|
<p>The parsable duck type interface to every parser usage.</p>
|
151
133
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
134
|
<div class="method-source-code" id="parse-source">
|
156
135
|
<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">
|
136
|
+
<span class="line-num">47</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>)
|
137
|
+
<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.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">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">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Symbol</span>
|
139
|
+
<span class="line-num">50</span>
|
140
|
+
<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">DISPLAY</span>.<span class="ruby-identifier">keys</span>)
|
141
|
+
<span class="line-num">52</span>
|
142
|
+
<span class="line-num">53</span> <span class="ruby-identifier">value</span>
|
143
|
+
<span class="line-num">54</span> <span class="ruby-keyword">end</span></pre>
|
165
144
|
</div>
|
166
|
-
|
167
145
|
</div>
|
168
146
|
|
169
147
|
|
170
|
-
|
171
|
-
|
172
148
|
</div>
|
173
149
|
|
174
|
-
|
175
150
|
</section>
|
176
151
|
|
177
152
|
</section>
|
178
|
-
|
179
153
|
</main>
|
180
154
|
|
181
155
|
|
182
156
|
<footer id="validator-badges" role="contentinfo">
|
183
157
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
184
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
158
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
185
159
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
186
160
|
</footer>
|
187
161
|
|