gravaty 8.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gravaty might be problematic. Click here for more details.

Files changed (137) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +587 -0
  3. data/COPYING.md +234 -0
  4. data/Gemfile +17 -0
  5. data/ISSUES.md +40 -0
  6. data/README.md +128 -0
  7. data/Rakefile +48 -0
  8. data/acknowledgements.md +40 -0
  9. data/authors.md +44 -0
  10. data/copyright.md +339 -0
  11. data/examples/avatar.rb +121 -0
  12. data/examples/basics.rb +60 -0
  13. data/examples/profile.rb +143 -0
  14. data/examples/xmlrpc.rb +33 -0
  15. data/gravaty.gemspec +59 -0
  16. data/gravaty.odp +0 -0
  17. data/gravaty.pdf +0 -0
  18. data/html/CHANGELOG.html +876 -0
  19. data/html/COPYING_md.html +803 -0
  20. data/html/Gemfile.html +114 -0
  21. data/html/Gravaty.html +322 -0
  22. data/html/Gravaty/Gravaty.html +997 -0
  23. data/html/Gravaty/ParsableDuckType.html +158 -0
  24. data/html/Gravaty/Parser.html +233 -0
  25. data/html/Gravaty/Parsers.html +94 -0
  26. data/html/Gravaty/Parsers/Avatar.html +166 -0
  27. data/html/Gravaty/Parsers/Callback.html +167 -0
  28. data/html/Gravaty/Parsers/Default.html +174 -0
  29. data/html/Gravaty/Parsers/Force.html +167 -0
  30. data/html/Gravaty/Parsers/Format.html +177 -0
  31. data/html/Gravaty/Parsers/Pixelsize.html +177 -0
  32. data/html/Gravaty/Parsers/Rating.html +177 -0
  33. data/html/Gravaty/Parsers/Secure.html +166 -0
  34. data/html/Gravaty/Parsers/Type.html +177 -0
  35. data/html/Gravaty/Utils.html +107 -0
  36. data/html/Gravaty/Utils/Downloader.html +106 -0
  37. data/html/Gravaty/Utils/Downloader/Downloader.html +224 -0
  38. data/html/Gravaty/Utils/Raisers.html +199 -0
  39. data/html/Gravaty/Utils/Rfc5322.html +149 -0
  40. data/html/Gravaty/Utils/RpcConnector.html +106 -0
  41. data/html/Gravaty/Utils/RpcConnector/RpcConnector.html +241 -0
  42. data/html/ISSUES_md.html +165 -0
  43. data/html/Object.html +183 -0
  44. data/html/README_md.html +436 -0
  45. data/html/Rakefile.html +152 -0
  46. data/html/acknowledgements_md.html +172 -0
  47. data/html/authors_md.html +178 -0
  48. data/html/copyright_md.html +553 -0
  49. data/html/created.rid +59 -0
  50. data/html/css/fonts.css +167 -0
  51. data/html/css/rdoc.css +590 -0
  52. data/html/fonts/Lato-Light.ttf +0 -0
  53. data/html/fonts/Lato-LightItalic.ttf +0 -0
  54. data/html/fonts/Lato-Regular.ttf +0 -0
  55. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  56. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  57. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  58. data/html/gravaty_gemspec.html +162 -0
  59. data/html/images/add.png +0 -0
  60. data/html/images/arrow_up.png +0 -0
  61. data/html/images/brick.png +0 -0
  62. data/html/images/brick_link.png +0 -0
  63. data/html/images/bug.png +0 -0
  64. data/html/images/bullet_black.png +0 -0
  65. data/html/images/bullet_toggle_minus.png +0 -0
  66. data/html/images/bullet_toggle_plus.png +0 -0
  67. data/html/images/date.png +0 -0
  68. data/html/images/delete.png +0 -0
  69. data/html/images/find.png +0 -0
  70. data/html/images/loadingAnimation.gif +0 -0
  71. data/html/images/macFFBgHack.png +0 -0
  72. data/html/images/package.png +0 -0
  73. data/html/images/page_green.png +0 -0
  74. data/html/images/page_white_text.png +0 -0
  75. data/html/images/page_white_width.png +0 -0
  76. data/html/images/plugin.png +0 -0
  77. data/html/images/ruby.png +0 -0
  78. data/html/images/tag_blue.png +0 -0
  79. data/html/images/tag_green.png +0 -0
  80. data/html/images/transparent.png +0 -0
  81. data/html/images/wrench.png +0 -0
  82. data/html/images/wrench_orange.png +0 -0
  83. data/html/images/zoom.png +0 -0
  84. data/html/index.html +467 -0
  85. data/html/js/darkfish.js +161 -0
  86. data/html/js/jquery.js +4 -0
  87. data/html/js/navigation.js +142 -0
  88. data/html/js/navigation.js.gz +0 -0
  89. data/html/js/search.js +109 -0
  90. data/html/js/search_index.js +1 -0
  91. data/html/js/search_index.js.gz +0 -0
  92. data/html/js/searcher.js +229 -0
  93. data/html/js/searcher.js.gz +0 -0
  94. data/html/table_of_contents.html +479 -0
  95. data/lib/gravaty.rb +59 -0
  96. data/lib/gravaty/application.rb +272 -0
  97. data/lib/gravaty/constants.rb +53 -0
  98. data/lib/gravaty/locales/en.yml +34 -0
  99. data/lib/gravaty/locales/it.yml +34 -0
  100. data/lib/gravaty/locales/ja.yml +35 -0
  101. data/lib/gravaty/parser.rb +41 -0
  102. data/lib/gravaty/parsers/avatar.rb +33 -0
  103. data/lib/gravaty/parsers/callback.rb +34 -0
  104. data/lib/gravaty/parsers/default.rb +79 -0
  105. data/lib/gravaty/parsers/force.rb +33 -0
  106. data/lib/gravaty/parsers/format.rb +38 -0
  107. data/lib/gravaty/parsers/pixelsize.rb +38 -0
  108. data/lib/gravaty/parsers/rating.rb +38 -0
  109. data/lib/gravaty/parsers/secure.rb +32 -0
  110. data/lib/gravaty/parsers/type.rb +38 -0
  111. data/lib/gravaty/utils/downloader.rb +150 -0
  112. data/lib/gravaty/utils/raisers.rb +50 -0
  113. data/lib/gravaty/utils/rfc5322.rb +102 -0
  114. data/lib/gravaty/utils/rpc_connector.rb +71 -0
  115. data/lib/gravaty/version.rb +20 -0
  116. data/test/gravaty/locales/test_locales.rb +61 -0
  117. data/test/gravaty/parsers/test_avatar.rb +35 -0
  118. data/test/gravaty/parsers/test_callback.rb +37 -0
  119. data/test/gravaty/parsers/test_default.rb +69 -0
  120. data/test/gravaty/parsers/test_force.rb +35 -0
  121. data/test/gravaty/parsers/test_format.rb +48 -0
  122. data/test/gravaty/parsers/test_pixelsize.rb +50 -0
  123. data/test/gravaty/parsers/test_rating.rb +48 -0
  124. data/test/gravaty/parsers/test_secure.rb +35 -0
  125. data/test/gravaty/parsers/test_type.rb +37 -0
  126. data/test/gravaty/test_application.rb +111 -0
  127. data/test/gravaty/test_avatar.rb +115 -0
  128. data/test/gravaty/test_parsable_duck_type.rb +31 -0
  129. data/test/gravaty/test_parser.rb +55 -0
  130. data/test/gravaty/test_profile.rb +63 -0
  131. data/test/gravaty/utils/test_downloader.rb +43 -0
  132. data/test/gravaty/utils/test_raisers.rb +55 -0
  133. data/test/gravaty/utils/test_rfc5322.rb +58 -0
  134. data/test/gravaty/utils/test_rpc_connector.rb +74 -0
  135. data/test/test_gravaty.rb +44 -0
  136. data/test/test_helper.rb +77 -0
  137. metadata +315 -0
@@ -0,0 +1,107 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Gravaty::Utils - gravaty 8.0.0</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/jquery.js"></script>
15
+ <script src="../js/darkfish.js"></script>
16
+
17
+ <link href="../css/fonts.css" rel="stylesheet">
18
+ <link href="../css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="module">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="../index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="../table_of_contents.html#pages">Pages</a>
32
+ <a href="../table_of_contents.html#classes">Classes</a>
33
+ <a href="../table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+
59
+
60
+
61
+
62
+ </div>
63
+ </nav>
64
+
65
+ <main role="main" aria-labelledby="module-Gravaty::Utils">
66
+ <h1 id="module-Gravaty::Utils" class="module">
67
+ module Gravaty::Utils
68
+ </h1>
69
+
70
+ <section class="description">
71
+
72
+ <p>This module is a simple collection of useful things and methods that I
73
+ prefer to keep as DRYer as possible. Just include it and use the methods…</p>
74
+ <dl class="rdoc-list note-list"><dt>Author
75
+ <dd>
76
+ <p><a href="mailto:m.bresciani@email.it">Marco Bresciani</a></p>
77
+ </dd><dt>Copyright
78
+ <dd>
79
+ <p>Copyright © 2013, 2014, 2015, 2016 Marco Bresciani</p>
80
+ </dd><dt>License
81
+ <dd>
82
+ <p>GNU General Public License version 3</p>
83
+ </dd></dl>
84
+
85
+ </section>
86
+
87
+
88
+ <section id="5Buntitled-5D" class="documentation-section">
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ </section>
99
+ </main>
100
+
101
+
102
+ <footer id="validator-badges" role="contentinfo">
103
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
104
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.4.
105
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
106
+ </footer>
107
+
@@ -0,0 +1,106 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Gravaty::Utils::Downloader - gravaty 8.0.0</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../../";
11
+ var index_rel_prefix = "../../";
12
+ </script>
13
+
14
+ <script src="../../js/jquery.js"></script>
15
+ <script src="../../js/darkfish.js"></script>
16
+
17
+ <link href="../../css/fonts.css" rel="stylesheet">
18
+ <link href="../../css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="module">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="../../index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="../../table_of_contents.html#pages">Pages</a>
32
+ <a href="../../table_of_contents.html#classes">Classes</a>
33
+ <a href="../../table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+
59
+
60
+
61
+
62
+ </div>
63
+ </nav>
64
+
65
+ <main role="main" aria-labelledby="module-Gravaty::Utils::Downloader">
66
+ <h1 id="module-Gravaty::Utils::Downloader" class="module">
67
+ module Gravaty::Utils::Downloader
68
+ </h1>
69
+
70
+ <section class="description">
71
+
72
+ <p>This module is a simple wrapper container for Peter R. Marreck&#39;s gist.</p>
73
+ <dl class="rdoc-list note-list"><dt>Author
74
+ <dd>
75
+ <p><a href="mailto:jon.forums@gmail.com">Jon Maken</a></p>
76
+ </dd><dt>License
77
+ <dd>
78
+ <p>3-clause BSD</p>
79
+ </dd><dt>Revision
80
+ <dd>
81
+ <p>2012-03-25 23:01:19 -0600</p>
82
+ </dd></dl>
83
+
84
+ </section>
85
+
86
+
87
+ <section id="5Buntitled-5D" class="documentation-section">
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ </section>
98
+ </main>
99
+
100
+
101
+ <footer id="validator-badges" role="contentinfo">
102
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
103
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.4.
104
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
105
+ </footer>
106
+
@@ -0,0 +1,224 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Gravaty::Utils::Downloader::Downloader - gravaty 8.0.0</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../../../";
11
+ var index_rel_prefix = "../../../";
12
+ </script>
13
+
14
+ <script src="../../../js/jquery.js"></script>
15
+ <script src="../../../js/darkfish.js"></script>
16
+
17
+ <link href="../../../css/fonts.css" rel="stylesheet">
18
+ <link href="../../../css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="class">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="../../../index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="../../../table_of_contents.html#pages">Pages</a>
32
+ <a href="../../../table_of_contents.html#classes">Classes</a>
33
+ <a href="../../../table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+ <div id="parent-class-section" class="nav-section">
59
+ <h3>Parent</h3>
60
+
61
+
62
+ <p class="link"><a href="../../../Object.html">Object</a>
63
+
64
+ </div>
65
+
66
+
67
+
68
+ <!-- Method Quickref -->
69
+ <div id="method-list-section" class="nav-section">
70
+ <h3>Methods</h3>
71
+
72
+ <ul class="link-list" role="directory">
73
+
74
+ <li ><a href="#method-c-download_file">::download_file</a>
75
+
76
+ </ul>
77
+ </div>
78
+
79
+ </div>
80
+ </nav>
81
+
82
+ <main role="main" aria-labelledby="class-Gravaty::Utils::Downloader::Downloader">
83
+ <h1 id="class-Gravaty::Utils::Downloader::Downloader" class="class">
84
+ class Gravaty::Utils::Downloader::Downloader
85
+ </h1>
86
+
87
+ <section class="description">
88
+
89
+ <p>!/usr/bin/env ruby</p>
90
+
91
+ <pre>An HTTP/HTTPS/FTP file downloader library/CLI based upon MiniPortile&#39;s HTTP implementation.
92
+
93
+ Author:: Jon Maken
94
+ License:: 3-clause BSD
95
+ Revision:: 2012-03-25 23:01:19 -0600</pre>
96
+
97
+ </section>
98
+
99
+
100
+ <section id="5Buntitled-5D" class="documentation-section">
101
+
102
+
103
+
104
+
105
+
106
+ <section class="constants-list">
107
+ <header>
108
+ <h3>Constants</h3>
109
+ </header>
110
+ <dl>
111
+
112
+ <dt id="VERSION">VERSION
113
+
114
+ <dd>
115
+
116
+
117
+ </dl>
118
+ </section>
119
+
120
+
121
+
122
+ <section class="attribute-method-details" class="method-section">
123
+ <header>
124
+ <h3>Attributes</h3>
125
+ </header>
126
+
127
+
128
+ <div id="attribute-c-ftp_data_chunk_size" class="method-detail">
129
+ <div class="method-heading attribute-method-heading">
130
+ <span class="method-name">ftp_data_chunk_size</span><span
131
+ class="attribute-access-type">[RW]</span>
132
+ </div>
133
+
134
+ <div class="method-description">
135
+
136
+
137
+
138
+ </div>
139
+ </div>
140
+
141
+ <div id="attribute-c-logger" class="method-detail">
142
+ <div class="method-heading attribute-method-heading">
143
+ <span class="method-name">logger</span><span
144
+ class="attribute-access-type">[RW]</span>
145
+ </div>
146
+
147
+ <div class="method-description">
148
+
149
+
150
+
151
+ </div>
152
+ </div>
153
+
154
+ <div id="attribute-c-max_ca_verify_depth" class="method-detail">
155
+ <div class="method-heading attribute-method-heading">
156
+ <span class="method-name">max_ca_verify_depth</span><span
157
+ class="attribute-access-type">[RW]</span>
158
+ </div>
159
+
160
+ <div class="method-description">
161
+
162
+
163
+
164
+ </div>
165
+ </div>
166
+
167
+ </section>
168
+
169
+
170
+
171
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
172
+ <header>
173
+ <h3>Public Class Methods</h3>
174
+ </header>
175
+
176
+
177
+ <div id="method-c-download_file" class="method-detail ">
178
+
179
+ <div class="method-heading">
180
+ <span class="method-name">download_file</span><span
181
+ class="method-args">(url, full_path, count = 3)</span>
182
+
183
+ <span class="method-click-advice">click to toggle source</span>
184
+
185
+ </div>
186
+
187
+
188
+ <div class="method-description">
189
+
190
+
191
+
192
+
193
+
194
+
195
+ <div class="method-source-code" id="download_file-source">
196
+ <pre><span class="ruby-comment"># File lib/gravaty/utils/downloader.rb, line 54</span>
197
+ <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>)
198
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">&#39;error.nil&#39;</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">url</span>.<span class="ruby-identifier">nil?</span>
199
+ <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>)
200
+
201
+ <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>)
202
+ <span class="ruby-keyword">end</span></pre>
203
+ </div>
204
+
205
+ </div>
206
+
207
+
208
+
209
+
210
+ </div>
211
+
212
+
213
+ </section>
214
+
215
+ </section>
216
+ </main>
217
+
218
+
219
+ <footer id="validator-badges" role="contentinfo">
220
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
221
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.4.
222
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
223
+ </footer>
224
+
@@ -0,0 +1,199 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Gravaty::Utils::Raisers - gravaty 8.0.0</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../../";
11
+ var index_rel_prefix = "../../";
12
+ </script>
13
+
14
+ <script src="../../js/jquery.js"></script>
15
+ <script src="../../js/darkfish.js"></script>
16
+
17
+ <link href="../../css/fonts.css" rel="stylesheet">
18
+ <link href="../../css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="module">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="../../index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="../../table_of_contents.html#pages">Pages</a>
32
+ <a href="../../table_of_contents.html#classes">Classes</a>
33
+ <a href="../../table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+
59
+
60
+
61
+ <!-- Method Quickref -->
62
+ <div id="method-list-section" class="nav-section">
63
+ <h3>Methods</h3>
64
+
65
+ <ul class="link-list" role="directory">
66
+
67
+ <li ><a href="#method-i-raiser_downcase">#raiser_downcase</a>
68
+
69
+ <li ><a href="#method-i-raiser_to_i">#raiser_to_i</a>
70
+
71
+ </ul>
72
+ </div>
73
+
74
+ </div>
75
+ </nav>
76
+
77
+ <main role="main" aria-labelledby="module-Gravaty::Utils::Raisers">
78
+ <h1 id="module-Gravaty::Utils::Raisers" class="module">
79
+ module Gravaty::Utils::Raisers
80
+ </h1>
81
+
82
+ <section class="description">
83
+
84
+ <p>This module contains some utility method to raise errors according to
85
+ (possibly) common conditions.</p>
86
+ <dl class="rdoc-list note-list"><dt>Author
87
+ <dd>
88
+ <p><a href="mailto:m.bresciani@email.it">Marco Bresciani</a></p>
89
+ </dd><dt>Copyright
90
+ <dd>
91
+ <p>Copyright © 2013, 2014, 2015, 2016 Marco Bresciani</p>
92
+ </dd><dt>License
93
+ <dd>
94
+ <p>GNU General Public License version 3</p>
95
+ </dd></dl>
96
+
97
+ </section>
98
+
99
+
100
+ <section id="5Buntitled-5D" class="documentation-section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
111
+ <header>
112
+ <h3>Public Instance Methods</h3>
113
+ </header>
114
+
115
+
116
+ <div id="method-i-raiser_downcase" class="method-detail ">
117
+
118
+ <div class="method-heading">
119
+ <span class="method-name">raiser_downcase</span><span
120
+ class="method-args">(name = &#39;error.value&#39;, value = nil, array = nil)</span>
121
+
122
+ <span class="method-click-advice">click to toggle source</span>
123
+
124
+ </div>
125
+
126
+
127
+ <div class="method-description">
128
+
129
+ <p>Raises an <code>ArgumentError</code> according to parameters, unless the
130
+ <code>array</code> contains a downcased <code>value</code>.</p>
131
+
132
+
133
+
134
+
135
+ <div class="method-source-code" id="raiser_downcase-source">
136
+ <pre><span class="ruby-comment"># File lib/gravaty/utils/raisers.rb, line 36</span>
137
+ <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">&#39;error.value&#39;</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>)
138
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
139
+ <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">unless</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>
140
+ <span class="ruby-keyword">end</span>
141
+ <span class="ruby-keyword">end</span></pre>
142
+ </div>
143
+
144
+ </div>
145
+
146
+
147
+
148
+
149
+ </div>
150
+
151
+
152
+ <div id="method-i-raiser_to_i" class="method-detail ">
153
+
154
+ <div class="method-heading">
155
+ <span class="method-name">raiser_to_i</span><span
156
+ class="method-args">(name = &#39;error.value&#39;, value = nil, array = nil)</span>
157
+
158
+ <span class="method-click-advice">click to toggle source</span>
159
+
160
+ </div>
161
+
162
+
163
+ <div class="method-description">
164
+
165
+ <p>Raises an <code>ArgumentError</code> according to parameters, unless the
166
+ <code>array</code> contains the number of the <code>value</code>.</p>
167
+
168
+
169
+
170
+
171
+ <div class="method-source-code" id="raiser_to_i-source">
172
+ <pre><span class="ruby-comment"># File lib/gravaty/utils/raisers.rb, line 43</span>
173
+ <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">&#39;error.value&#39;</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>)
174
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
175
+ <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">unless</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>
176
+ <span class="ruby-keyword">end</span>
177
+ <span class="ruby-keyword">end</span></pre>
178
+ </div>
179
+
180
+ </div>
181
+
182
+
183
+
184
+
185
+ </div>
186
+
187
+
188
+ </section>
189
+
190
+ </section>
191
+ </main>
192
+
193
+
194
+ <footer id="validator-badges" role="contentinfo">
195
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
196
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.4.
197
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
198
+ </footer>
199
+