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/Splitter.html
CHANGED
@@ -4,29 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Splitter - wwwjdic
|
7
|
+
<title>class WWWJDic::Splitter - 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,68 +36,61 @@
|
|
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-c-new">::new</a>
|
79
|
-
|
80
76
|
<li ><a href="#method-i-content">#content</a>
|
81
|
-
|
82
77
|
<li ><a href="#method-i-lines">#lines</a>
|
83
|
-
|
84
78
|
<li ><a href="#method-i-message">#message</a>
|
85
|
-
|
86
79
|
<li ><a href="#method-i-title">#title</a>
|
87
|
-
|
88
80
|
<li ><a href="#method-i-translation">#translation</a>
|
89
|
-
|
90
81
|
</ul>
|
91
82
|
</div>
|
92
83
|
|
93
84
|
</div>
|
94
85
|
</nav>
|
95
86
|
|
96
|
-
<main aria-labelledby="class-WWWJDic::Splitter"
|
97
|
-
<h1
|
87
|
+
<main role="main" aria-labelledby="class-WWWJDic::Splitter">
|
88
|
+
<h1 id="class-WWWJDic::Splitter" class="class">
|
98
89
|
class WWWJDic::Splitter
|
99
90
|
</h1>
|
100
91
|
|
101
92
|
<section class="description">
|
102
|
-
|
93
|
+
|
103
94
|
<p>This class is a simple API to interact with <a href="WWWJDic.html"><code>WWWJDic</code></a> Backboor Entry/API.</p>
|
104
95
|
<dl class="rdoc-list note-list"><dt>Author
|
105
96
|
<dd>
|
@@ -114,36 +105,25 @@
|
|
114
105
|
|
115
106
|
</section>
|
116
107
|
|
117
|
-
|
118
|
-
<section class="documentation-section" id="5Buntitled-5D">
|
119
|
-
|
120
|
-
|
121
|
-
|
108
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
122
109
|
|
123
110
|
|
124
111
|
|
125
112
|
|
126
113
|
|
127
|
-
|
128
|
-
<section class="method-section" id="public-class-5Buntitled-5D-method-details">
|
114
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
129
115
|
<header>
|
130
116
|
<h3>Public Class Methods</h3>
|
131
117
|
</header>
|
132
118
|
|
133
|
-
|
134
|
-
<div class="method-detail " id="method-c-new">
|
135
|
-
|
119
|
+
<div id="method-c-new" class="method-detail ">
|
136
120
|
<div class="method-heading">
|
137
121
|
<span class="method-name">new</span><span
|
138
122
|
class="method-args">(translation)</span>
|
139
|
-
|
140
123
|
<span class="method-click-advice">click to toggle source</span>
|
141
|
-
|
142
124
|
</div>
|
143
125
|
|
144
|
-
|
145
126
|
<div class="method-description">
|
146
|
-
|
147
127
|
<p>Creates a <code>Splitter</code> object.</p>
|
148
128
|
<dl class="rdoc-list note-list"><dt>Usage
|
149
129
|
<dd>
|
@@ -153,230 +133,153 @@
|
|
153
133
|
<p>a <code>Splitter</code> object.</p>
|
154
134
|
</dd></dl>
|
155
135
|
|
156
|
-
|
157
|
-
|
158
|
-
|
159
136
|
<div class="method-source-code" id="new-source">
|
160
137
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
161
|
-
<span class="line-num">
|
162
|
-
<span class="line-num">
|
163
|
-
<span class="line-num">
|
138
|
+
<span class="line-num">45</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">translation</span>)
|
139
|
+
<span class="line-num">46</span> <span class="ruby-ivar">@translation</span> = <span class="ruby-identifier">translation</span>.<span class="ruby-identifier">force_encoding</span>(<span class="ruby-string">'UTF-8'</span>)
|
140
|
+
<span class="line-num">47</span> <span class="ruby-keyword">end</span></pre>
|
164
141
|
</div>
|
165
|
-
|
166
142
|
</div>
|
167
143
|
|
168
144
|
|
169
|
-
|
170
|
-
|
171
145
|
</div>
|
172
146
|
|
173
|
-
|
174
147
|
</section>
|
175
148
|
|
176
|
-
<section
|
149
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
177
150
|
<header>
|
178
151
|
<h3>Public Instance Methods</h3>
|
179
152
|
</header>
|
180
153
|
|
181
|
-
|
182
|
-
<div class="method-detail " id="method-i-content">
|
183
|
-
|
154
|
+
<div id="method-i-content" class="method-detail ">
|
184
155
|
<div class="method-heading">
|
185
156
|
<span class="method-name">content</span><span
|
186
157
|
class="method-args">()</span>
|
187
|
-
|
188
158
|
<span class="method-click-advice">click to toggle source</span>
|
189
|
-
|
190
159
|
</div>
|
191
160
|
|
192
|
-
|
193
161
|
<div class="method-description">
|
194
|
-
|
195
162
|
<p>@return [Array] the arrays of elements containing the answer</p>
|
196
163
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
164
|
<div class="method-source-code" id="content-source">
|
201
165
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
202
|
-
<span class="line-num">
|
203
|
-
<span class="line-num">
|
204
|
-
<span class="line-num">
|
205
|
-
<span class="line-num">
|
206
|
-
<span class="line-num">
|
207
|
-
<span class="line-num">
|
208
|
-
<span class="line-num">
|
209
|
-
<span class="line-num">
|
210
|
-
<span class="line-num">
|
211
|
-
<span class="line-num">
|
212
|
-
<span class="line-num">
|
213
|
-
<span class="line-num">80</span> <span class="ruby-identifier">inner</span>[<span class="ruby-value">:text</span>] = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>(<span class="ruby-value">1</span>).<span class="ruby-identifier">strip</span> <span class="ruby-keyword">if</span> <span class="ruby-regexp">%r{/(.*)/}m</span>.<span class="ruby-identifier">match</span> <span class="ruby-identifier">a_line</span>
|
214
|
-
<span class="line-num">81</span> <span class="ruby-keyword">end</span>
|
215
|
-
<span class="line-num">82</span> <span class="ruby-identifier">inner</span>[<span class="ruby-value">:meanings</span>] = <span class="ruby-identifier">inner</span>[<span class="ruby-value">:text</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">'/'</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">inner</span>[<span class="ruby-value">:text</span>].<span class="ruby-identifier">include?</span> <span class="ruby-string">'/'</span>
|
216
|
-
<span class="line-num">83</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">inner</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">inner</span>.<span class="ruby-identifier">empty?</span>
|
217
|
-
<span class="line-num">84</span> <span class="ruby-keyword">end</span>
|
218
|
-
<span class="line-num">85</span>
|
219
|
-
<span class="line-num">86</span> <span class="ruby-identifier">result</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">empty?</span>
|
220
|
-
<span class="line-num">87</span> <span class="ruby-keyword">end</span></pre>
|
166
|
+
<span class="line-num">73</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">content</span>
|
167
|
+
<span class="line-num">74</span> <span class="ruby-identifier">result</span> = []
|
168
|
+
<span class="line-num">75</span> <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a_line</span><span class="ruby-operator">|</span>
|
169
|
+
<span class="line-num">76</span> <span class="ruby-identifier">inner</span> = {}
|
170
|
+
<span class="line-num">77</span> <span class="ruby-identifier">fill_inner_data</span>(<span class="ruby-identifier">a_line</span>, <span class="ruby-identifier">inner</span>)
|
171
|
+
<span class="line-num">78</span> <span class="ruby-identifier">inner</span>[<span class="ruby-value">:meanings</span>] = <span class="ruby-identifier">inner</span>[<span class="ruby-value">:text</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">'/'</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">inner</span>[<span class="ruby-value">:text</span>].<span class="ruby-identifier">include?</span> <span class="ruby-string">'/'</span>
|
172
|
+
<span class="line-num">79</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">inner</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">inner</span>.<span class="ruby-identifier">empty?</span>
|
173
|
+
<span class="line-num">80</span> <span class="ruby-keyword">end</span>
|
174
|
+
<span class="line-num">81</span>
|
175
|
+
<span class="line-num">82</span> <span class="ruby-identifier">result</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">empty?</span>
|
176
|
+
<span class="line-num">83</span> <span class="ruby-keyword">end</span></pre>
|
221
177
|
</div>
|
222
|
-
|
223
178
|
</div>
|
224
179
|
|
225
180
|
|
226
|
-
|
227
|
-
|
228
181
|
</div>
|
229
182
|
|
230
|
-
|
231
|
-
<div class="method-detail " id="method-i-lines">
|
232
|
-
|
183
|
+
<div id="method-i-lines" class="method-detail ">
|
233
184
|
<div class="method-heading">
|
234
185
|
<span class="method-name">lines</span><span
|
235
186
|
class="method-args">()</span>
|
236
|
-
|
237
187
|
<span class="method-click-advice">click to toggle source</span>
|
238
|
-
|
239
188
|
</div>
|
240
189
|
|
241
|
-
|
242
190
|
<div class="method-description">
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
191
|
+
|
248
192
|
|
249
193
|
<div class="method-source-code" id="lines-source">
|
250
194
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
251
|
-
<span class="line-num">
|
252
|
-
<span class="line-num">
|
253
|
-
<span class="line-num">
|
254
|
-
<span class="line-num">
|
255
|
-
<span class="line-num">
|
256
|
-
<span class="line-num">
|
257
|
-
<span class="line-num">
|
258
|
-
<span class="line-num">
|
195
|
+
<span class="line-num">63</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">lines</span>
|
196
|
+
<span class="line-num">64</span> <span class="ruby-identifier">result</span> = []
|
197
|
+
<span class="line-num">65</span> <span class="ruby-identifier">translation</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a_line</span><span class="ruby-operator">|</span>
|
198
|
+
<span class="line-num">66</span> <span class="ruby-identifier">stripped_line</span> = <span class="ruby-identifier">a_line</span>.<span class="ruby-identifier">strip</span>
|
199
|
+
<span class="line-num">67</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">stripped_line</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">stripped_line</span>.<span class="ruby-identifier">empty?</span>
|
200
|
+
<span class="line-num">68</span> <span class="ruby-keyword">end</span>
|
201
|
+
<span class="line-num">69</span> <span class="ruby-identifier">result</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">empty?</span>
|
202
|
+
<span class="line-num">70</span> <span class="ruby-keyword">end</span></pre>
|
259
203
|
</div>
|
260
|
-
|
261
204
|
</div>
|
262
205
|
|
263
206
|
|
264
|
-
|
265
|
-
|
266
207
|
</div>
|
267
208
|
|
268
|
-
|
269
|
-
<div class="method-detail " id="method-i-message">
|
270
|
-
|
209
|
+
<div id="method-i-message" class="method-detail ">
|
271
210
|
<div class="method-heading">
|
272
211
|
<span class="method-name">message</span><span
|
273
212
|
class="method-args">()</span>
|
274
|
-
|
275
213
|
<span class="method-click-advice">click to toggle source</span>
|
276
|
-
|
277
214
|
</div>
|
278
215
|
|
279
|
-
|
280
216
|
<div class="method-description">
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
217
|
+
|
286
218
|
|
287
219
|
<div class="method-source-code" id="message-source">
|
288
220
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
289
|
-
<span class="line-num">
|
290
|
-
<span class="line-num">
|
291
|
-
<span class="line-num">
|
292
|
-
<span class="line-num">
|
293
|
-
<span class="line-num">
|
221
|
+
<span class="line-num">57</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">message</span>
|
222
|
+
<span class="line-num">58</span> <span class="ruby-keyword">return</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>(<span class="ruby-value">1</span>).<span class="ruby-identifier">strip</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@translation</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-regexp">/<p>(.*)<p>/m</span>.<span class="ruby-identifier">match</span>(<span class="ruby-ivar">@translation</span>)
|
223
|
+
<span class="line-num">59</span>
|
224
|
+
<span class="line-num">60</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>(<span class="ruby-value">1</span>) <span class="ruby-keyword">if</span> <span class="ruby-ivar">@translation</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-regexp">/<p>(.*)<pre>/m</span>.<span class="ruby-identifier">match</span>(<span class="ruby-ivar">@translation</span>)
|
225
|
+
<span class="line-num">61</span> <span class="ruby-keyword">end</span></pre>
|
294
226
|
</div>
|
295
|
-
|
296
227
|
</div>
|
297
228
|
|
298
229
|
|
299
|
-
|
300
|
-
|
301
230
|
</div>
|
302
231
|
|
303
|
-
|
304
|
-
<div class="method-detail " id="method-i-title">
|
305
|
-
|
232
|
+
<div id="method-i-title" class="method-detail ">
|
306
233
|
<div class="method-heading">
|
307
234
|
<span class="method-name">title</span><span
|
308
235
|
class="method-args">()</span>
|
309
|
-
|
310
236
|
<span class="method-click-advice">click to toggle source</span>
|
311
|
-
|
312
237
|
</div>
|
313
238
|
|
314
|
-
|
315
239
|
<div class="method-description">
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
240
|
+
|
321
241
|
|
322
242
|
<div class="method-source-code" id="title-source">
|
323
243
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
324
|
-
<span class="line-num">
|
325
|
-
<span class="line-num">
|
326
|
-
<span class="line-num">
|
244
|
+
<span class="line-num">49</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">title</span>
|
245
|
+
<span class="line-num">50</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>(<span class="ruby-value">1</span>) <span class="ruby-keyword">if</span> <span class="ruby-regexp">%r{<TITLE>(.*)</TITLE>}</span>.<span class="ruby-identifier">match</span> <span class="ruby-ivar">@translation</span>
|
246
|
+
<span class="line-num">51</span> <span class="ruby-keyword">end</span></pre>
|
327
247
|
</div>
|
328
|
-
|
329
248
|
</div>
|
330
249
|
|
331
250
|
|
332
|
-
|
333
|
-
|
334
251
|
</div>
|
335
252
|
|
336
|
-
|
337
|
-
<div class="method-detail " id="method-i-translation">
|
338
|
-
|
253
|
+
<div id="method-i-translation" class="method-detail ">
|
339
254
|
<div class="method-heading">
|
340
255
|
<span class="method-name">translation</span><span
|
341
256
|
class="method-args">()</span>
|
342
|
-
|
343
257
|
<span class="method-click-advice">click to toggle source</span>
|
344
|
-
|
345
258
|
</div>
|
346
259
|
|
347
|
-
|
348
260
|
<div class="method-description">
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
261
|
+
|
354
262
|
|
355
263
|
<div class="method-source-code" id="translation-source">
|
356
264
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
357
|
-
<span class="line-num">
|
358
|
-
<span class="line-num">
|
359
|
-
<span class="line-num">
|
265
|
+
<span class="line-num">53</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">translation</span>
|
266
|
+
<span class="line-num">54</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>(<span class="ruby-value">1</span>).<span class="ruby-identifier">strip</span> <span class="ruby-keyword">if</span> <span class="ruby-regexp">%r{<pre>(.*)</pre>}m</span>.<span class="ruby-identifier">match</span> <span class="ruby-ivar">@translation</span>
|
267
|
+
<span class="line-num">55</span> <span class="ruby-keyword">end</span></pre>
|
360
268
|
</div>
|
361
|
-
|
362
269
|
</div>
|
363
270
|
|
364
271
|
|
365
|
-
|
366
|
-
|
367
272
|
</div>
|
368
273
|
|
369
|
-
|
370
274
|
</section>
|
371
275
|
|
372
276
|
</section>
|
373
|
-
|
374
277
|
</main>
|
375
278
|
|
376
279
|
|
377
280
|
<footer id="validator-badges" role="contentinfo">
|
378
281
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
379
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
282
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
380
283
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
381
284
|
</footer>
|
382
285
|
|
data/html/WWWJDic/Utils.html
CHANGED
@@ -4,29 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>module WWWJDic::Utils - wwwjdic
|
7
|
+
<title>module WWWJDic::Utils - 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,41 +36,41 @@
|
|
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::Utils"
|
70
|
-
<h1
|
67
|
+
<main role="main" aria-labelledby="module-WWWJDic::Utils">
|
68
|
+
<h1 id="module-WWWJDic::Utils" class="module">
|
71
69
|
module WWWJDic::Utils
|
72
70
|
</h1>
|
73
71
|
|
74
72
|
<section class="description">
|
75
|
-
|
73
|
+
|
76
74
|
<p>This module is a simple collection of useful things and methods that I prefer to keep as DRYer as possible. Just include it and use the methods…</p>
|
77
75
|
<dl class="rdoc-list note-list"><dt>Author
|
78
76
|
<dd>
|
@@ -87,25 +85,19 @@
|
|
87
85
|
|
88
86
|
</section>
|
89
87
|
|
90
|
-
|
91
|
-
<section class="documentation-section" id="5Buntitled-5D">
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
88
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
96
89
|
|
97
90
|
|
98
91
|
|
99
92
|
|
100
93
|
|
101
94
|
</section>
|
102
|
-
|
103
95
|
</main>
|
104
96
|
|
105
97
|
|
106
98
|
<footer id="validator-badges" role="contentinfo">
|
107
99
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
108
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
100
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
109
101
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
110
102
|
</footer>
|
111
103
|
|