gravaty 10.0.0 → 11.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +7 -0
- data/Gemfile +5 -1
- data/README.md +219 -212
- data/Rakefile +9 -3
- data/copyright.md +33 -136
- data/examples/avatar.rb +70 -43
- data/examples/basics.rb +30 -20
- data/examples/profile.rb +77 -50
- data/examples/xmlrpc.rb +24 -10
- data/gravaty.gemspec +46 -25
- data/html/CHANGELOG.html +13 -20
- data/html/COPYING_md.html +8 -24
- data/html/Gemfile.html +7 -21
- data/html/Gravaty.html +49 -113
- data/html/Gravaty/Gravaty.html +138 -343
- data/html/Gravaty/ParsableDuckType.html +14 -33
- data/html/Gravaty/Parser.html +27 -66
- data/html/Gravaty/Parsers.html +3 -11
- data/html/Gravaty/Parsers/Avatar.html +19 -36
- data/html/Gravaty/Parsers/Callback.html +21 -37
- data/html/Gravaty/Parsers/Default.html +28 -45
- data/html/Gravaty/Parsers/Force.html +21 -37
- data/html/Gravaty/Parsers/Format.html +22 -42
- data/html/Gravaty/Parsers/Pixelsize.html +22 -42
- data/html/Gravaty/Parsers/Rating.html +22 -42
- data/html/Gravaty/Parsers/Secure.html +19 -36
- data/html/Gravaty/Parsers/Type.html +22 -42
- data/html/Gravaty/Utils.html +11 -13
- data/html/Gravaty/Utils/Downloader.html +3 -11
- data/html/Gravaty/Utils/Downloader/Downloader.html +25 -59
- data/html/Gravaty/Utils/Raisers.html +24 -55
- data/html/Gravaty/Utils/Rfc5322.html +12 -19
- data/html/Gravaty/Utils/RpcConnector.html +11 -13
- data/html/Gravaty/Utils/RpcConnector/RpcConnector.html +33 -73
- data/html/Object.html +728 -57
- data/html/README_md.html +105 -100
- data/html/Rakefile.html +9 -23
- data/html/copyright_md.html +17 -119
- data/html/created.rid +48 -55
- data/html/css/rdoc.css +1 -1
- data/html/index.html +97 -114
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +219 -651
- data/lib/gravaty.rb +22 -15
- data/lib/gravaty/application.rb +40 -25
- data/lib/gravaty/constants.rb +20 -11
- data/lib/gravaty/locales/en.yml +9 -3
- data/lib/gravaty/locales/it.yml +9 -3
- data/lib/gravaty/locales/ja.yml +7 -4
- data/lib/gravaty/parser.rb +16 -10
- data/lib/gravaty/parsers/avatar.rb +11 -3
- data/lib/gravaty/parsers/callback.rb +13 -4
- data/lib/gravaty/parsers/default.rb +24 -16
- data/lib/gravaty/parsers/force.rb +12 -2
- data/lib/gravaty/parsers/format.rb +11 -2
- data/lib/gravaty/parsers/pixelsize.rb +12 -3
- data/lib/gravaty/parsers/rating.rb +12 -3
- data/lib/gravaty/parsers/secure.rb +11 -2
- data/lib/gravaty/parsers/type.rb +11 -2
- data/lib/gravaty/utils/downloader.rb +98 -96
- data/lib/gravaty/utils/raisers.rb +19 -12
- data/lib/gravaty/utils/rfc5322.rb +54 -41
- data/lib/gravaty/utils/rpc_connector.rb +19 -11
- data/lib/gravaty/version.rb +10 -2
- data/test/gravaty/locales/en.yml +29 -0
- data/test/gravaty/locales/it.yml +29 -0
- data/test/gravaty/locales/ja.yml +27 -0
- data/test/gravaty/locales/test_locales.rb +17 -13
- data/test/gravaty/parsers/test_avatar.rb +9 -1
- data/test/gravaty/parsers/test_callback.rb +12 -4
- data/test/gravaty/parsers/test_default.rb +25 -21
- data/test/gravaty/parsers/test_force.rb +9 -1
- data/test/gravaty/parsers/test_format.rb +18 -11
- data/test/gravaty/parsers/test_pixelsize.rb +19 -12
- data/test/gravaty/parsers/test_rating.rb +18 -11
- data/test/gravaty/parsers/test_secure.rb +9 -1
- data/test/gravaty/parsers/test_type.rb +14 -5
- data/test/gravaty/test_application.rb +14 -6
- data/test/gravaty/test_avatar.rb +94 -59
- data/test/gravaty/test_parser.rb +11 -5
- data/test/gravaty/test_profile.rb +47 -25
- data/test/gravaty/utils/test_downloader.rb +43 -28
- data/test/gravaty/utils/test_raisers.rb +42 -26
- data/test/gravaty/utils/test_rfc5322.rb +35 -13
- data/test/gravaty/utils/test_rpc_connector.rb +83 -39
- data/test/test_gravaty.rb +12 -4
- data/test/test_helper.rb +15 -9
- metadata +54 -40
- data/ISSUES.md +0 -62
- data/acknowledgements.md +0 -66
- data/authors.md +0 -63
- data/examples/cacert.pem +0 -3466
- data/html/ISSUES_md.html +0 -166
- data/html/acknowledgements_md.html +0 -161
- data/html/authors_md.html +0 -174
- data/html/examples/cacert_pem.html +0 -1078
data/html/Gravaty/Utils.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>module Gravaty::Utils - gravaty
|
7
|
+
<title>module Gravaty::Utils - gravaty 11.0.1</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
@@ -21,8 +21,6 @@
|
|
21
21
|
<link href="../css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
24
|
<body id="top" role="document" class="module">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
@@ -77,35 +75,35 @@
|
|
77
75
|
<dl class="rdoc-list note-list"><dt>Author
|
78
76
|
<dd>
|
79
77
|
<p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p>
|
80
|
-
</dd
|
78
|
+
</dd></dl>
|
79
|
+
|
80
|
+
<p>rubocop:disable Style/AsciiComments</p>
|
81
|
+
<dl class="rdoc-list note-list"><dt>Copyright
|
81
82
|
<dd>
|
82
83
|
<p>Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani</p>
|
83
|
-
</dd
|
84
|
+
</dd></dl>
|
85
|
+
|
86
|
+
<p>rubocop:enable Style/AsciiComments</p>
|
87
|
+
<dl class="rdoc-list note-list"><dt>License
|
84
88
|
<dd>
|
85
89
|
<p>GNU General Public License version 3</p>
|
86
90
|
</dd></dl>
|
87
91
|
|
88
92
|
</section>
|
89
93
|
|
90
|
-
|
91
94
|
<section id="5Buntitled-5D" class="documentation-section">
|
92
|
-
|
93
95
|
|
94
|
-
|
95
96
|
|
96
|
-
|
97
97
|
|
98
|
-
|
99
98
|
|
100
|
-
|
101
|
-
</section>
|
102
99
|
|
100
|
+
</section>
|
103
101
|
</main>
|
104
102
|
|
105
103
|
|
106
104
|
<footer id="validator-badges" role="contentinfo">
|
107
105
|
<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.
|
106
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
109
107
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
110
108
|
</footer>
|
111
109
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>module Gravaty::Utils::Downloader - gravaty
|
7
|
+
<title>module Gravaty::Utils::Downloader - gravaty 11.0.1</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../../";
|
@@ -21,8 +21,6 @@
|
|
21
21
|
<link href="../../css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
24
|
<body id="top" role="document" class="module">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
@@ -87,25 +85,19 @@
|
|
87
85
|
|
88
86
|
</section>
|
89
87
|
|
90
|
-
|
91
88
|
<section id="5Buntitled-5D" class="documentation-section">
|
92
|
-
|
93
89
|
|
94
|
-
|
95
90
|
|
96
|
-
|
97
91
|
|
98
|
-
|
99
92
|
|
100
|
-
|
101
|
-
</section>
|
102
93
|
|
94
|
+
</section>
|
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
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class Gravaty::Utils::Downloader::Downloader - gravaty
|
7
|
+
<title>class Gravaty::Utils::Downloader::Downloader - gravaty 11.0.1</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../../../";
|
@@ -21,8 +21,6 @@
|
|
21
21
|
<link href="../../../css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
24
|
<body id="top" role="document" class="class">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
@@ -59,24 +57,22 @@
|
|
59
57
|
|
60
58
|
<div id="class-metadata">
|
61
59
|
|
62
|
-
|
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
|
|
71
68
|
|
72
|
-
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
73
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-download_file">::download_file</a>
|
79
|
-
|
80
76
|
</ul>
|
81
77
|
</div>
|
82
78
|
|
@@ -92,44 +88,38 @@
|
|
92
88
|
|
93
89
|
<p>!/usr/bin/env ruby</p>
|
94
90
|
|
95
|
-
<
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
License
|
100
|
-
|
91
|
+
<p>An HTTP/HTTPS/FTP file downloader library/CLI based upon MiniPortile's HTTP implementation.</p>
|
92
|
+
<dl class="rdoc-list note-list"><dt>Author
|
93
|
+
<dd>
|
94
|
+
<p>Jon Maken</p>
|
95
|
+
</dd><dt>License
|
96
|
+
<dd>
|
97
|
+
<p>3-clause BSD</p>
|
98
|
+
</dd><dt>Revision
|
99
|
+
<dd>
|
100
|
+
<p>2012-03-25 23:01:19 -0600</p>
|
101
|
+
</dd></dl>
|
101
102
|
|
102
103
|
</section>
|
103
104
|
|
104
|
-
|
105
105
|
<section id="5Buntitled-5D" class="documentation-section">
|
106
|
-
|
107
106
|
|
108
|
-
|
109
107
|
|
110
|
-
|
111
108
|
<section class="constants-list">
|
112
109
|
<header>
|
113
110
|
<h3>Constants</h3>
|
114
111
|
</header>
|
115
112
|
<dl>
|
116
|
-
|
117
113
|
<dt id="VERSION">VERSION
|
118
|
-
|
119
114
|
<dd>
|
120
|
-
|
121
|
-
|
122
115
|
</dl>
|
123
116
|
</section>
|
124
|
-
|
125
117
|
|
126
|
-
|
127
118
|
<section class="attribute-method-details" class="method-section">
|
128
119
|
<header>
|
129
120
|
<h3>Attributes</h3>
|
130
121
|
</header>
|
131
122
|
|
132
|
-
|
133
123
|
<div id="attribute-c-ftp_data_chunk_size" class="method-detail">
|
134
124
|
<div class="method-heading attribute-method-heading">
|
135
125
|
<span class="method-name">ftp_data_chunk_size</span><span
|
@@ -138,11 +128,8 @@ Revision:: 2012-03-25 23:01:19 -0600</pre>
|
|
138
128
|
|
139
129
|
<div class="method-description">
|
140
130
|
|
141
|
-
|
142
|
-
|
143
131
|
</div>
|
144
132
|
</div>
|
145
|
-
|
146
133
|
<div id="attribute-c-logger" class="method-detail">
|
147
134
|
<div class="method-heading attribute-method-heading">
|
148
135
|
<span class="method-name">logger</span><span
|
@@ -151,11 +138,8 @@ Revision:: 2012-03-25 23:01:19 -0600</pre>
|
|
151
138
|
|
152
139
|
<div class="method-description">
|
153
140
|
|
154
|
-
|
155
|
-
|
156
141
|
</div>
|
157
142
|
</div>
|
158
|
-
|
159
143
|
<div id="attribute-c-max_ca_verify_depth" class="method-detail">
|
160
144
|
<div class="method-heading attribute-method-heading">
|
161
145
|
<span class="method-name">max_ca_verify_depth</span><span
|
@@ -164,67 +148,49 @@ Revision:: 2012-03-25 23:01:19 -0600</pre>
|
|
164
148
|
|
165
149
|
<div class="method-description">
|
166
150
|
|
167
|
-
|
168
|
-
|
169
151
|
</div>
|
170
152
|
</div>
|
171
|
-
|
172
153
|
</section>
|
173
|
-
|
174
154
|
|
175
|
-
|
155
|
+
|
176
156
|
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
177
157
|
<header>
|
178
158
|
<h3>Public Class Methods</h3>
|
179
159
|
</header>
|
180
160
|
|
181
|
-
|
182
161
|
<div id="method-c-download_file" class="method-detail ">
|
183
|
-
|
184
162
|
<div class="method-heading">
|
185
163
|
<span class="method-name">download_file</span><span
|
186
164
|
class="method-args">(url, full_path, count = 3)</span>
|
187
|
-
|
188
165
|
<span class="method-click-advice">click to toggle source</span>
|
189
|
-
|
190
166
|
</div>
|
191
|
-
|
192
167
|
|
193
168
|
<div class="method-description">
|
194
169
|
|
195
|
-
|
196
|
-
|
197
|
-
|
198
170
|
|
199
|
-
|
200
171
|
<div class="method-source-code" id="download_file-source">
|
201
172
|
<pre> <span class="ruby-comment"># File lib/gravaty/utils/downloader.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">
|
173
|
+
<span class="line-num">63</span> <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">download_file</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">full_path</span>, <span class="ruby-identifier">count</span> = <span class="ruby-value">3</span>)
|
174
|
+
<span class="line-num">64</span> <span class="ruby-identifier">raise</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">url</span>.<span class="ruby-identifier">nil?</span>
|
175
|
+
<span class="line-num">65</span> <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">full_path</span>)
|
176
|
+
<span class="line-num">66</span>
|
177
|
+
<span class="line-num">67</span> <span class="ruby-identifier">http_download</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">full_path</span>, <span class="ruby-identifier">count</span>)
|
178
|
+
<span class="line-num">68</span> <span class="ruby-keyword">end</span></pre>
|
208
179
|
</div>
|
209
|
-
|
210
180
|
</div>
|
211
181
|
|
212
|
-
|
213
182
|
|
214
|
-
|
215
183
|
</div>
|
216
184
|
|
217
|
-
|
218
185
|
</section>
|
219
|
-
|
220
|
-
</section>
|
221
186
|
|
187
|
+
</section>
|
222
188
|
</main>
|
223
189
|
|
224
190
|
|
225
191
|
<footer id="validator-badges" role="contentinfo">
|
226
192
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
227
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
193
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
228
194
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
229
195
|
</footer>
|
230
196
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>module Gravaty::Utils::Raisers - gravaty
|
7
|
+
<title>module Gravaty::Utils::Raisers - gravaty 11.0.1</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../../";
|
@@ -21,8 +21,6 @@
|
|
21
21
|
<link href="../../css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
24
|
<body id="top" role="document" class="module">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
@@ -62,16 +60,14 @@
|
|
62
60
|
|
63
61
|
|
64
62
|
|
65
|
-
|
63
|
+
|
64
|
+
<!-- Method Quickref -->
|
66
65
|
<div id="method-list-section" class="nav-section">
|
67
66
|
<h3>Methods</h3>
|
68
67
|
|
69
68
|
<ul class="link-list" role="directory">
|
70
|
-
|
71
69
|
<li ><a href="#method-i-raiser_downcase">#raiser_downcase</a>
|
72
|
-
|
73
70
|
<li ><a href="#method-i-raiser_to_i">#raiser_to_i</a>
|
74
|
-
|
75
71
|
</ul>
|
76
72
|
</div>
|
77
73
|
|
@@ -89,115 +85,88 @@
|
|
89
85
|
<dl class="rdoc-list note-list"><dt>Author
|
90
86
|
<dd>
|
91
87
|
<p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p>
|
92
|
-
</dd
|
88
|
+
</dd></dl>
|
89
|
+
|
90
|
+
<p>rubocop:disable Style/AsciiComments</p>
|
91
|
+
<dl class="rdoc-list note-list"><dt>Copyright
|
93
92
|
<dd>
|
94
93
|
<p>Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani</p>
|
95
|
-
</dd
|
94
|
+
</dd></dl>
|
95
|
+
|
96
|
+
<p>rubocop:enable Style/AsciiComments</p>
|
97
|
+
<dl class="rdoc-list note-list"><dt>License
|
96
98
|
<dd>
|
97
99
|
<p>GNU General Public License version 3</p>
|
98
100
|
</dd></dl>
|
99
101
|
|
100
102
|
</section>
|
101
103
|
|
102
|
-
|
103
104
|
<section id="5Buntitled-5D" class="documentation-section">
|
104
|
-
|
105
105
|
|
106
|
-
|
107
106
|
|
108
|
-
|
109
107
|
|
110
|
-
|
111
108
|
|
112
|
-
|
109
|
+
|
113
110
|
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
114
111
|
<header>
|
115
112
|
<h3>Public Instance Methods</h3>
|
116
113
|
</header>
|
117
114
|
|
118
|
-
|
119
115
|
<div id="method-i-raiser_downcase" class="method-detail ">
|
120
|
-
|
121
116
|
<div class="method-heading">
|
122
117
|
<span class="method-name">raiser_downcase</span><span
|
123
118
|
class="method-args">(name = 'error.value', value = nil, array = nil)</span>
|
124
|
-
|
125
119
|
<span class="method-click-advice">click to toggle source</span>
|
126
|
-
|
127
120
|
</div>
|
128
|
-
|
129
121
|
|
130
122
|
<div class="method-description">
|
131
|
-
|
132
123
|
<p>Raises an <code>ArgumentError</code> according to parameters, unless the <code>array</code> contains a downcased <code>value</code>.</p>
|
133
|
-
|
134
|
-
|
135
124
|
|
136
|
-
|
137
125
|
<div class="method-source-code" id="raiser_downcase-source">
|
138
126
|
<pre> <span class="ruby-comment"># File lib/gravaty/utils/raisers.rb</span>
|
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">49</span> <span class="ruby-keyword">end</span></pre>
|
127
|
+
<span class="line-num">53</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">raiser_downcase</span>(<span class="ruby-identifier">name</span> = <span class="ruby-string">'error.value'</span>, <span class="ruby-identifier">value</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">array</span> = <span class="ruby-keyword">nil</span>)
|
128
|
+
<span class="line-num">54</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-identifier">name</span>, <span class="ruby-value">value:</span> <span class="ruby-identifier">value</span>) <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span>
|
129
|
+
<span class="line-num">55</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">array</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">downcase</span>) <span class="ruby-operator">&&</span>
|
130
|
+
<span class="line-num">56</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">array</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">downcase</span>)
|
131
|
+
<span class="line-num">57</span> <span class="ruby-keyword">end</span></pre>
|
145
132
|
</div>
|
146
|
-
|
147
133
|
</div>
|
148
134
|
|
149
|
-
|
150
135
|
|
151
|
-
|
152
136
|
</div>
|
153
137
|
|
154
|
-
|
155
138
|
<div id="method-i-raiser_to_i" class="method-detail ">
|
156
|
-
|
157
139
|
<div class="method-heading">
|
158
140
|
<span class="method-name">raiser_to_i</span><span
|
159
141
|
class="method-args">(name = 'error.value', value = nil, array = nil)</span>
|
160
|
-
|
161
142
|
<span class="method-click-advice">click to toggle source</span>
|
162
|
-
|
163
143
|
</div>
|
164
|
-
|
165
144
|
|
166
145
|
<div class="method-description">
|
167
|
-
|
168
146
|
<p>Raises an <code>ArgumentError</code> according to parameters, unless the <code>array</code> contains the number of the <code>value</code>.</p>
|
169
|
-
|
170
|
-
|
171
147
|
|
172
|
-
|
173
148
|
<div class="method-source-code" id="raiser_to_i-source">
|
174
149
|
<pre> <span class="ruby-comment"># File lib/gravaty/utils/raisers.rb</span>
|
175
|
-
<span class="line-num">
|
176
|
-
<span class="line-num">
|
177
|
-
<span class="line-num">
|
178
|
-
<span class="line-num">
|
179
|
-
<span class="line-num">
|
180
|
-
<span class="line-num">58</span> <span class="ruby-keyword">end</span></pre>
|
150
|
+
<span class="line-num">61</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">raiser_to_i</span>(<span class="ruby-identifier">name</span> = <span class="ruby-string">'error.value'</span>, <span class="ruby-identifier">value</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">array</span> = <span class="ruby-keyword">nil</span>)
|
151
|
+
<span class="line-num">62</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-identifier">name</span>, <span class="ruby-value">value:</span> <span class="ruby-identifier">value</span>) <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span>
|
152
|
+
<span class="line-num">63</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">array</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_i</span>) <span class="ruby-operator">&&</span>
|
153
|
+
<span class="line-num">64</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">array</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_i</span>)
|
154
|
+
<span class="line-num">65</span> <span class="ruby-keyword">end</span></pre>
|
181
155
|
</div>
|
182
|
-
|
183
156
|
</div>
|
184
157
|
|
185
|
-
|
186
158
|
|
187
|
-
|
188
159
|
</div>
|
189
160
|
|
190
|
-
|
191
161
|
</section>
|
192
|
-
|
193
|
-
</section>
|
194
162
|
|
163
|
+
</section>
|
195
164
|
</main>
|
196
165
|
|
197
166
|
|
198
167
|
<footer id="validator-badges" role="contentinfo">
|
199
168
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
200
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
169
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
201
170
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
202
171
|
</footer>
|
203
172
|
|