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
@@ -4,27 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Parsers::Server - wwwjdic 16.
|
7
|
+
<title>class WWWJDic::Parsers::Server - 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,20 +87,20 @@
|
|
87
87
|
</div>
|
88
88
|
</nav>
|
89
89
|
|
90
|
-
<main
|
91
|
-
<h1 id="class-WWWJDic::Parsers::Server"
|
90
|
+
<main aria-labelledby="class-WWWJDic::Parsers::Server" role="main">
|
91
|
+
<h1 class="class" id="class-WWWJDic::Parsers::Server">
|
92
92
|
class WWWJDic::Parsers::Server
|
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 display type. The only needed parameter is a boolean, with <code>true</code> for regular.</p>
|
98
98
|
<dl class="rdoc-list note-list"><dt>Author
|
99
99
|
<dd>
|
100
100
|
<p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p>
|
101
101
|
</dd><dt>Copyright
|
102
102
|
<dd>
|
103
|
-
<p
|
103
|
+
<p>© 2014-2021 Marco Bresciani</p>
|
104
104
|
</dd><dt>License
|
105
105
|
<dd>
|
106
106
|
<p>GNU General Public License version 3</p>
|
@@ -108,18 +108,18 @@
|
|
108
108
|
|
109
109
|
</section>
|
110
110
|
|
111
|
-
<section
|
111
|
+
<section class="documentation-section" id="5Buntitled-5D">
|
112
112
|
|
113
113
|
|
114
114
|
|
115
115
|
|
116
116
|
|
117
|
-
<section id="public-instance-5Buntitled-5D-method-details"
|
117
|
+
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
118
118
|
<header>
|
119
119
|
<h3>Public Instance Methods</h3>
|
120
120
|
</header>
|
121
121
|
|
122
|
-
<div
|
122
|
+
<div class="method-detail " id="method-i-parse">
|
123
123
|
<div class="method-heading">
|
124
124
|
<span class="method-name">parse</span><span
|
125
125
|
class="method-args">(value = :edrdg)</span>
|
@@ -131,14 +131,14 @@
|
|
131
131
|
|
132
132
|
<div class="method-source-code" id="parse-source">
|
133
133
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parsers/server.rb</span>
|
134
|
-
<span class="line-num">
|
135
|
-
<span class="line-num">
|
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">
|
134
|
+
<span class="line-num">42</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">43</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">44</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">45</span>
|
138
|
+
<span class="line-num">46</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">47</span>
|
140
|
+
<span class="line-num">48</span> <span class="ruby-identifier">value</span>
|
141
|
+
<span class="line-num">49</span> <span class="ruby-keyword">end</span></pre>
|
142
142
|
</div>
|
143
143
|
</div>
|
144
144
|
|
@@ -153,7 +153,6 @@
|
|
153
153
|
|
154
154
|
<footer id="validator-badges" role="contentinfo">
|
155
155
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
156
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.
|
156
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.2.
|
157
157
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
158
158
|
</footer>
|
159
|
-
|
data/html/WWWJDic/Splitter.html
CHANGED
@@ -4,27 +4,27 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Splitter - wwwjdic 16.
|
7
|
+
<title>class WWWJDic::Splitter - 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">
|
@@ -84,20 +84,20 @@
|
|
84
84
|
</div>
|
85
85
|
</nav>
|
86
86
|
|
87
|
-
<main
|
88
|
-
<h1 id="class-WWWJDic::Splitter"
|
87
|
+
<main aria-labelledby="class-WWWJDic::Splitter" role="main">
|
88
|
+
<h1 class="class" id="class-WWWJDic::Splitter">
|
89
89
|
class WWWJDic::Splitter
|
90
90
|
</h1>
|
91
91
|
|
92
92
|
<section class="description">
|
93
|
-
|
93
|
+
|
94
94
|
<p>This class is a simple API to interact with <a href="WWWJDic.html"><code>WWWJDic</code></a> Backboor Entry/API.</p>
|
95
95
|
<dl class="rdoc-list note-list"><dt>Author
|
96
96
|
<dd>
|
97
97
|
<p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p>
|
98
98
|
</dd><dt>Copyright
|
99
99
|
<dd>
|
100
|
-
<p
|
100
|
+
<p>© 2014-2021 Marco Bresciani</p>
|
101
101
|
</dd><dt>License
|
102
102
|
<dd>
|
103
103
|
<p>GNU General Public License version 3</p>
|
@@ -105,18 +105,18 @@
|
|
105
105
|
|
106
106
|
</section>
|
107
107
|
|
108
|
-
<section
|
108
|
+
<section class="documentation-section" id="5Buntitled-5D">
|
109
109
|
|
110
110
|
|
111
111
|
|
112
112
|
|
113
113
|
|
114
|
-
<section id="public-class-5Buntitled-5D-method-details"
|
114
|
+
<section class="method-section" id="public-class-5Buntitled-5D-method-details">
|
115
115
|
<header>
|
116
116
|
<h3>Public Class Methods</h3>
|
117
117
|
</header>
|
118
118
|
|
119
|
-
<div
|
119
|
+
<div class="method-detail " id="method-c-new">
|
120
120
|
<div class="method-heading">
|
121
121
|
<span class="method-name">new</span><span
|
122
122
|
class="method-args">(translation)</span>
|
@@ -135,9 +135,9 @@
|
|
135
135
|
|
136
136
|
<div class="method-source-code" id="new-source">
|
137
137
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
138
|
-
<span class="line-num">
|
139
|
-
<span class="line-num">
|
140
|
-
<span class="line-num">
|
138
|
+
<span class="line-num">44</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">45</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">46</span> <span class="ruby-keyword">end</span></pre>
|
141
141
|
</div>
|
142
142
|
</div>
|
143
143
|
|
@@ -146,12 +146,12 @@
|
|
146
146
|
|
147
147
|
</section>
|
148
148
|
|
149
|
-
<section id="public-instance-5Buntitled-5D-method-details"
|
149
|
+
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
150
150
|
<header>
|
151
151
|
<h3>Public Instance Methods</h3>
|
152
152
|
</header>
|
153
153
|
|
154
|
-
<div
|
154
|
+
<div class="method-detail " id="method-i-content">
|
155
155
|
<div class="method-heading">
|
156
156
|
<span class="method-name">content</span><span
|
157
157
|
class="method-args">()</span>
|
@@ -163,24 +163,24 @@
|
|
163
163
|
|
164
164
|
<div class="method-source-code" id="content-source">
|
165
165
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
166
|
-
<span class="line-num">
|
167
|
-
<span class="line-num">
|
168
|
-
<span class="line-num">
|
169
|
-
<span class="line-num">
|
170
|
-
<span class="line-num">
|
171
|
-
<span class="line-num">
|
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">
|
166
|
+
<span class="line-num">72</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">content</span>
|
167
|
+
<span class="line-num">73</span> <span class="ruby-identifier">result</span> = []
|
168
|
+
<span class="line-num">74</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">75</span> <span class="ruby-identifier">inner</span> = {}
|
170
|
+
<span class="line-num">76</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">77</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">78</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">79</span> <span class="ruby-keyword">end</span>
|
174
|
+
<span class="line-num">80</span>
|
175
|
+
<span class="line-num">81</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">82</span> <span class="ruby-keyword">end</span></pre>
|
177
177
|
</div>
|
178
178
|
</div>
|
179
179
|
|
180
180
|
|
181
181
|
</div>
|
182
182
|
|
183
|
-
<div
|
183
|
+
<div class="method-detail " id="method-i-lines">
|
184
184
|
<div class="method-heading">
|
185
185
|
<span class="method-name">lines</span><span
|
186
186
|
class="method-args">()</span>
|
@@ -188,25 +188,25 @@
|
|
188
188
|
</div>
|
189
189
|
|
190
190
|
<div class="method-description">
|
191
|
-
|
191
|
+
|
192
192
|
|
193
193
|
<div class="method-source-code" id="lines-source">
|
194
194
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
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">
|
202
|
-
<span class="line-num">
|
195
|
+
<span class="line-num">62</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">lines</span>
|
196
|
+
<span class="line-num">63</span> <span class="ruby-identifier">result</span> = []
|
197
|
+
<span class="line-num">64</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">65</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">66</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">67</span> <span class="ruby-keyword">end</span>
|
201
|
+
<span class="line-num">68</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">69</span> <span class="ruby-keyword">end</span></pre>
|
203
203
|
</div>
|
204
204
|
</div>
|
205
205
|
|
206
206
|
|
207
207
|
</div>
|
208
208
|
|
209
|
-
<div
|
209
|
+
<div class="method-detail " id="method-i-message">
|
210
210
|
<div class="method-heading">
|
211
211
|
<span class="method-name">message</span><span
|
212
212
|
class="method-args">()</span>
|
@@ -214,22 +214,22 @@
|
|
214
214
|
</div>
|
215
215
|
|
216
216
|
<div class="method-description">
|
217
|
-
|
217
|
+
|
218
218
|
|
219
219
|
<div class="method-source-code" id="message-source">
|
220
220
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
221
|
-
<span class="line-num">
|
222
|
-
<span class="line-num">
|
223
|
-
<span class="line-num">
|
224
|
-
<span class="line-num">
|
225
|
-
<span class="line-num">
|
221
|
+
<span class="line-num">56</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">message</span>
|
222
|
+
<span class="line-num">57</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">58</span>
|
224
|
+
<span class="line-num">59</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">60</span> <span class="ruby-keyword">end</span></pre>
|
226
226
|
</div>
|
227
227
|
</div>
|
228
228
|
|
229
229
|
|
230
230
|
</div>
|
231
231
|
|
232
|
-
<div
|
232
|
+
<div class="method-detail " id="method-i-title">
|
233
233
|
<div class="method-heading">
|
234
234
|
<span class="method-name">title</span><span
|
235
235
|
class="method-args">()</span>
|
@@ -237,20 +237,20 @@
|
|
237
237
|
</div>
|
238
238
|
|
239
239
|
<div class="method-description">
|
240
|
-
|
240
|
+
|
241
241
|
|
242
242
|
<div class="method-source-code" id="title-source">
|
243
243
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
244
|
-
<span class="line-num">
|
245
|
-
<span class="line-num">
|
246
|
-
<span class="line-num">
|
244
|
+
<span class="line-num">48</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">title</span>
|
245
|
+
<span class="line-num">49</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">50</span> <span class="ruby-keyword">end</span></pre>
|
247
247
|
</div>
|
248
248
|
</div>
|
249
249
|
|
250
250
|
|
251
251
|
</div>
|
252
252
|
|
253
|
-
<div
|
253
|
+
<div class="method-detail " id="method-i-translation">
|
254
254
|
<div class="method-heading">
|
255
255
|
<span class="method-name">translation</span><span
|
256
256
|
class="method-args">()</span>
|
@@ -258,13 +258,13 @@
|
|
258
258
|
</div>
|
259
259
|
|
260
260
|
<div class="method-description">
|
261
|
-
|
261
|
+
|
262
262
|
|
263
263
|
<div class="method-source-code" id="translation-source">
|
264
264
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/utils/splitter.rb</span>
|
265
|
-
<span class="line-num">
|
266
|
-
<span class="line-num">
|
267
|
-
<span class="line-num">
|
265
|
+
<span class="line-num">52</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">translation</span>
|
266
|
+
<span class="line-num">53</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">54</span> <span class="ruby-keyword">end</span></pre>
|
268
268
|
</div>
|
269
269
|
</div>
|
270
270
|
|
@@ -279,7 +279,6 @@
|
|
279
279
|
|
280
280
|
<footer id="validator-badges" role="contentinfo">
|
281
281
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
282
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.
|
282
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.2.
|
283
283
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
284
284
|
</footer>
|
285
|
-
|