apes 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/.rubocop.yml +82 -0
  4. data/.travis-gemfile +15 -0
  5. data/.travis.yml +15 -0
  6. data/.yardopts +1 -0
  7. data/CHANGELOG.md +3 -0
  8. data/Gemfile +22 -0
  9. data/README.md +177 -0
  10. data/Rakefile +44 -0
  11. data/apes.gemspec +34 -0
  12. data/doc/Apes.html +130 -0
  13. data/doc/Apes/Concerns.html +127 -0
  14. data/doc/Apes/Concerns/Errors.html +1089 -0
  15. data/doc/Apes/Concerns/Pagination.html +636 -0
  16. data/doc/Apes/Concerns/Request.html +766 -0
  17. data/doc/Apes/Concerns/Response.html +940 -0
  18. data/doc/Apes/Controller.html +1100 -0
  19. data/doc/Apes/Errors.html +125 -0
  20. data/doc/Apes/Errors/AuthenticationError.html +133 -0
  21. data/doc/Apes/Errors/BadRequestError.html +157 -0
  22. data/doc/Apes/Errors/BaseError.html +320 -0
  23. data/doc/Apes/Errors/InvalidDataError.html +157 -0
  24. data/doc/Apes/Errors/MissingDataError.html +157 -0
  25. data/doc/Apes/Model.html +378 -0
  26. data/doc/Apes/PaginationCursor.html +2138 -0
  27. data/doc/Apes/RuntimeConfiguration.html +909 -0
  28. data/doc/Apes/Serializers.html +125 -0
  29. data/doc/Apes/Serializers/JSON.html +389 -0
  30. data/doc/Apes/Serializers/JWT.html +452 -0
  31. data/doc/Apes/Serializers/List.html +347 -0
  32. data/doc/Apes/UrlsParser.html +1432 -0
  33. data/doc/Apes/Validators.html +125 -0
  34. data/doc/Apes/Validators/BaseValidator.html +278 -0
  35. data/doc/Apes/Validators/BooleanValidator.html +494 -0
  36. data/doc/Apes/Validators/EmailValidator.html +350 -0
  37. data/doc/Apes/Validators/PhoneValidator.html +375 -0
  38. data/doc/Apes/Validators/ReferenceValidator.html +372 -0
  39. data/doc/Apes/Validators/TimestampValidator.html +640 -0
  40. data/doc/Apes/Validators/UuidValidator.html +372 -0
  41. data/doc/Apes/Validators/ZipCodeValidator.html +372 -0
  42. data/doc/Apes/Version.html +189 -0
  43. data/doc/ApplicationController.html +547 -0
  44. data/doc/Concerns.html +128 -0
  45. data/doc/Concerns/ErrorHandling.html +826 -0
  46. data/doc/Concerns/PaginationHandling.html +463 -0
  47. data/doc/Concerns/RequestHandling.html +512 -0
  48. data/doc/Concerns/ResponseHandling.html +579 -0
  49. data/doc/Errors.html +126 -0
  50. data/doc/Errors/AuthenticationError.html +123 -0
  51. data/doc/Errors/BadRequestError.html +147 -0
  52. data/doc/Errors/BaseError.html +289 -0
  53. data/doc/Errors/InvalidDataError.html +147 -0
  54. data/doc/Errors/MissingDataError.html +147 -0
  55. data/doc/Model.html +315 -0
  56. data/doc/PaginationCursor.html +764 -0
  57. data/doc/Serializers.html +126 -0
  58. data/doc/Serializers/JSON.html +253 -0
  59. data/doc/Serializers/JWT.html +253 -0
  60. data/doc/Serializers/List.html +245 -0
  61. data/doc/Validators.html +126 -0
  62. data/doc/Validators/BaseValidator.html +209 -0
  63. data/doc/Validators/BooleanValidator.html +391 -0
  64. data/doc/Validators/EmailValidator.html +298 -0
  65. data/doc/Validators/PhoneValidator.html +313 -0
  66. data/doc/Validators/ReferenceValidator.html +284 -0
  67. data/doc/Validators/TimestampValidator.html +476 -0
  68. data/doc/Validators/UuidValidator.html +310 -0
  69. data/doc/Validators/ZipCodeValidator.html +310 -0
  70. data/doc/_index.html +435 -0
  71. data/doc/class_list.html +58 -0
  72. data/doc/css/common.css +1 -0
  73. data/doc/css/full_list.css +57 -0
  74. data/doc/css/style.css +339 -0
  75. data/doc/file.README.html +252 -0
  76. data/doc/file_list.html +60 -0
  77. data/doc/frames.html +26 -0
  78. data/doc/index.html +252 -0
  79. data/doc/js/app.js +219 -0
  80. data/doc/js/full_list.js +181 -0
  81. data/doc/js/jquery.js +4 -0
  82. data/doc/method_list.html +615 -0
  83. data/doc/top-level-namespace.html +112 -0
  84. data/lib/apes.rb +40 -0
  85. data/lib/apes/concerns/errors.rb +111 -0
  86. data/lib/apes/concerns/pagination.rb +81 -0
  87. data/lib/apes/concerns/request.rb +237 -0
  88. data/lib/apes/concerns/response.rb +74 -0
  89. data/lib/apes/controller.rb +77 -0
  90. data/lib/apes/errors.rb +38 -0
  91. data/lib/apes/model.rb +94 -0
  92. data/lib/apes/pagination_cursor.rb +152 -0
  93. data/lib/apes/runtime_configuration.rb +80 -0
  94. data/lib/apes/serializers.rb +88 -0
  95. data/lib/apes/urls_parser.rb +233 -0
  96. data/lib/apes/validators.rb +234 -0
  97. data/lib/apes/version.rb +24 -0
  98. data/spec/apes/concerns/errors_spec.rb +141 -0
  99. data/spec/apes/concerns/pagination_spec.rb +114 -0
  100. data/spec/apes/concerns/request_spec.rb +244 -0
  101. data/spec/apes/concerns/response_spec.rb +79 -0
  102. data/spec/apes/controller_spec.rb +54 -0
  103. data/spec/apes/errors_spec.rb +14 -0
  104. data/spec/apes/models_spec.rb +148 -0
  105. data/spec/apes/pagination_cursor_spec.rb +113 -0
  106. data/spec/apes/runtime_configuration_spec.rb +100 -0
  107. data/spec/apes/serializers_spec.rb +70 -0
  108. data/spec/apes/urls_parser_spec.rb +150 -0
  109. data/spec/apes/validators_spec.rb +237 -0
  110. data/spec/spec_helper.rb +30 -0
  111. data/views/_included.json.jbuilder +9 -0
  112. data/views/_pagination.json.jbuilder +9 -0
  113. data/views/collection.json.jbuilder +4 -0
  114. data/views/errors/400.json.jbuilder +9 -0
  115. data/views/errors/403.json.jbuilder +7 -0
  116. data/views/errors/404.json.jbuilder +6 -0
  117. data/views/errors/422.json.jbuilder +19 -0
  118. data/views/errors/500.json.jbuilder +12 -0
  119. data/views/errors/501.json.jbuilder +7 -0
  120. data/views/layouts/general.json.jbuilder +36 -0
  121. data/views/object.json.jbuilder +4 -0
  122. metadata +262 -0
@@ -0,0 +1,189 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Apes::Version
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!Apes/Version.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (V)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Apes.html" title="Apes (module)">Apes</a></span></span>
36
+ &raquo;
37
+ <span class="title">Version</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Apes::Version
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/apes/version.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+ <p>The current version of apes, according to semantic versioning.</p>
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+
96
+
97
+ <p class="tag_title">See Also:</p>
98
+ <ul class="see">
99
+
100
+ <li><a href="http://semver.org" target="_parent" title="http://semver.org">http://semver.org</a></li>
101
+
102
+ </ul>
103
+
104
+ </div>
105
+ <h2>Constant Summary</h2>
106
+
107
+ <dl class="constants">
108
+
109
+ <dt id="MAJOR-constant" class="">MAJOR =
110
+ <div class="docstring">
111
+ <div class="discussion">
112
+ <p>The major version.</p>
113
+
114
+
115
+ </div>
116
+ </div>
117
+ <div class="tags">
118
+
119
+
120
+ </div>
121
+ </dt>
122
+ <dd><pre class="code"><span class='int'>1</span></pre></dd>
123
+
124
+ <dt id="MINOR-constant" class="">MINOR =
125
+ <div class="docstring">
126
+ <div class="discussion">
127
+ <p>The minor version.</p>
128
+
129
+
130
+ </div>
131
+ </div>
132
+ <div class="tags">
133
+
134
+
135
+ </div>
136
+ </dt>
137
+ <dd><pre class="code"><span class='int'>0</span></pre></dd>
138
+
139
+ <dt id="PATCH-constant" class="">PATCH =
140
+ <div class="docstring">
141
+ <div class="discussion">
142
+ <p>The patch version.</p>
143
+
144
+
145
+ </div>
146
+ </div>
147
+ <div class="tags">
148
+
149
+
150
+ </div>
151
+ </dt>
152
+ <dd><pre class="code"><span class='int'>0</span></pre></dd>
153
+
154
+ <dt id="STRING-constant" class="">STRING =
155
+ <div class="docstring">
156
+ <div class="discussion">
157
+ <p>The current version of apes.</p>
158
+
159
+
160
+ </div>
161
+ </div>
162
+ <div class="tags">
163
+
164
+
165
+ </div>
166
+ </dt>
167
+ <dd><pre class="code"><span class='lbracket'>[</span><span class='const'>MAJOR</span><span class='comma'>,</span> <span class='const'>MINOR</span><span class='comma'>,</span> <span class='const'>PATCH</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span></pre></dd>
168
+
169
+ </dl>
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ </div>
181
+
182
+ <div id="footer">
183
+ Generated on Sat Jun 4 12:41:53 2016 by
184
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
+ 0.8.7.6 (ruby-2.3.0).
186
+ </div>
187
+
188
+ </body>
189
+ </html>
@@ -0,0 +1,547 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: ApplicationController
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!ApplicationController.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (A)</a> &raquo;
35
+
36
+
37
+ <span class="title">ApplicationController</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: ApplicationController
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">ActionController::API</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">ActionController::API</li>
82
+
83
+ <li class="next">ApplicationController</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dt class="r2">Includes:</dt>
96
+ <dd class="r2">ActionView::Layouts, Apes::Concerns::Errors, Apes::Concerns::Pagination, Apes::Concerns::Request, Apes::Concerns::Response</dd>
97
+
98
+
99
+
100
+
101
+
102
+ <dt class="r1 last">Defined in:</dt>
103
+ <dd class="r1 last">lib/apes/controller.rb</dd>
104
+
105
+ </dl>
106
+ <div class="clear"></div>
107
+
108
+ <h2>Overview</h2><div class="docstring">
109
+ <div class="discussion">
110
+ <p>This file is part of the apes gem. Copyright (C) 2016 and above Shogun <a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#115;&#104;&#111;&#103;&#117;&#110;&#064;&#099;&#111;&#119;&#116;&#101;&#099;&#104;&#046;&#105;&#116;">&#115;&#104;&#111;&#103;&#117;&#110;&#064;&#099;&#111;&#119;&#116;&#101;&#099;&#104;&#046;&#105;&#116;</a>.
111
+ Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.</p>
112
+
113
+
114
+ </div>
115
+ </div>
116
+ <div class="tags">
117
+
118
+
119
+ </div>
120
+
121
+
122
+
123
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
124
+ <ul class="summary">
125
+
126
+ <li class="public ">
127
+ <span class="summary_signature">
128
+
129
+ <a href="#current_account-instance_method" title="#current_account (instance method)">- (Object) <strong>current_account</strong> </a>
130
+
131
+
132
+
133
+ </span>
134
+
135
+
136
+
137
+
138
+ <span class="note title readonly">readonly</span>
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute current_account.</p>
149
+ </div></span>
150
+
151
+ </li>
152
+
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#cursor-instance_method" title="#cursor (instance method)">- (Object) <strong>cursor</strong> </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+
165
+
166
+ <span class="note title readonly">readonly</span>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute cursor.</p>
177
+ </div></span>
178
+
179
+ </li>
180
+
181
+
182
+ <li class="public ">
183
+ <span class="summary_signature">
184
+
185
+ <a href="#request_cursor-instance_method" title="#request_cursor (instance method)">- (Object) <strong>request_cursor</strong> </a>
186
+
187
+
188
+
189
+ </span>
190
+
191
+
192
+
193
+
194
+ <span class="note title readonly">readonly</span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute request_cursor.</p>
205
+ </div></span>
206
+
207
+ </li>
208
+
209
+
210
+ </ul>
211
+
212
+
213
+
214
+
215
+
216
+ <h2>
217
+ Instance Method Summary
218
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
219
+ </h2>
220
+
221
+ <ul class="summary">
222
+
223
+ <li class="public ">
224
+ <span class="summary_signature">
225
+
226
+ <a href="#default_url_options-instance_method" title="#default_url_options (instance method)">- (Object) <strong>default_url_options</strong> </a>
227
+
228
+
229
+
230
+ </span>
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+ <span class="summary_desc"><div class='inline'>
241
+ </div></span>
242
+
243
+ </li>
244
+
245
+
246
+ <li class="public ">
247
+ <span class="summary_signature">
248
+
249
+ <a href="#handle_cors-instance_method" title="#handle_cors (instance method)">- (Object) <strong>handle_cors</strong> </a>
250
+
251
+
252
+
253
+ </span>
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+ <span class="summary_desc"><div class='inline'>
264
+ </div></span>
265
+
266
+ </li>
267
+
268
+
269
+ <li class="public ">
270
+ <span class="summary_signature">
271
+
272
+ <a href="#render_error-instance_method" title="#render_error (instance method)">- (Object) <strong>render_error</strong>(status, errors) </a>
273
+
274
+
275
+
276
+ </span>
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+ <span class="summary_desc"><div class='inline'>
287
+ </div></span>
288
+
289
+ </li>
290
+
291
+
292
+ </ul>
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+ <div id="instance_attr_details" class="attr_details">
303
+ <h2>Instance Attribute Details</h2>
304
+
305
+
306
+ <span id=""></span>
307
+ <div class="method_details first">
308
+ <h3 class="signature first" id="current_account-instance_method">
309
+
310
+ - (<tt>Object</tt>) <strong>current_account</strong> <span class="extras">(readonly)</span>
311
+
312
+
313
+
314
+
315
+
316
+ </h3><div class="docstring">
317
+ <div class="discussion">
318
+ <p>Returns the value of attribute current_account</p>
319
+
320
+
321
+ </div>
322
+ </div>
323
+ <div class="tags">
324
+
325
+
326
+ </div><table class="source_code">
327
+ <tr>
328
+ <td>
329
+ <pre class="lines">
330
+
331
+
332
+ 19
333
+ 20
334
+ 21</pre>
335
+ </td>
336
+ <td>
337
+ <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 19</span>
338
+
339
+ <span class='kw'>def</span> <span class='id identifier rubyid_current_account'>current_account</span>
340
+ <span class='ivar'>@current_account</span>
341
+ <span class='kw'>end</span></pre>
342
+ </td>
343
+ </tr>
344
+ </table>
345
+ </div>
346
+
347
+
348
+ <span id=""></span>
349
+ <div class="method_details ">
350
+ <h3 class="signature " id="cursor-instance_method">
351
+
352
+ - (<tt>Object</tt>) <strong>cursor</strong> <span class="extras">(readonly)</span>
353
+
354
+
355
+
356
+
357
+
358
+ </h3><div class="docstring">
359
+ <div class="discussion">
360
+ <p>Returns the value of attribute cursor</p>
361
+
362
+
363
+ </div>
364
+ </div>
365
+ <div class="tags">
366
+
367
+
368
+ </div><table class="source_code">
369
+ <tr>
370
+ <td>
371
+ <pre class="lines">
372
+
373
+
374
+ 19
375
+ 20
376
+ 21</pre>
377
+ </td>
378
+ <td>
379
+ <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 19</span>
380
+
381
+ <span class='kw'>def</span> <span class='id identifier rubyid_cursor'>cursor</span>
382
+ <span class='ivar'>@cursor</span>
383
+ <span class='kw'>end</span></pre>
384
+ </td>
385
+ </tr>
386
+ </table>
387
+ </div>
388
+
389
+
390
+ <span id=""></span>
391
+ <div class="method_details ">
392
+ <h3 class="signature " id="request_cursor-instance_method">
393
+
394
+ - (<tt>Object</tt>) <strong>request_cursor</strong> <span class="extras">(readonly)</span>
395
+
396
+
397
+
398
+
399
+
400
+ </h3><div class="docstring">
401
+ <div class="discussion">
402
+ <p>Returns the value of attribute request_cursor</p>
403
+
404
+
405
+ </div>
406
+ </div>
407
+ <div class="tags">
408
+
409
+
410
+ </div><table class="source_code">
411
+ <tr>
412
+ <td>
413
+ <pre class="lines">
414
+
415
+
416
+ 19
417
+ 20
418
+ 21</pre>
419
+ </td>
420
+ <td>
421
+ <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 19</span>
422
+
423
+ <span class='kw'>def</span> <span class='id identifier rubyid_request_cursor'>request_cursor</span>
424
+ <span class='ivar'>@request_cursor</span>
425
+ <span class='kw'>end</span></pre>
426
+ </td>
427
+ </tr>
428
+ </table>
429
+ </div>
430
+
431
+ </div>
432
+
433
+
434
+ <div id="instance_method_details" class="method_details_list">
435
+ <h2>Instance Method Details</h2>
436
+
437
+
438
+ <div class="method_details first">
439
+ <h3 class="signature first" id="default_url_options-instance_method">
440
+
441
+ - (<tt>Object</tt>) <strong>default_url_options</strong>
442
+
443
+
444
+
445
+
446
+
447
+ </h3><table class="source_code">
448
+ <tr>
449
+ <td>
450
+ <pre class="lines">
451
+
452
+
453
+ 26
454
+ 27
455
+ 28
456
+ 29
457
+ 30</pre>
458
+ </td>
459
+ <td>
460
+ <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 26</span>
461
+
462
+ <span class='kw'>def</span> <span class='id identifier rubyid_default_url_options'>default_url_options</span>
463
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>only_path:</span> <span class='kw'>false</span><span class='rbrace'>}</span>
464
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>host:</span> <span class='id identifier rubyid_request_source_host'>request_source_host</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_env'>env</span><span class='period'>.</span><span class='id identifier rubyid_development?'>development?</span>
465
+ <span class='id identifier rubyid_rv'>rv</span>
466
+ <span class='kw'>end</span></pre>
467
+ </td>
468
+ </tr>
469
+ </table>
470
+ </div>
471
+
472
+ <div class="method_details ">
473
+ <h3 class="signature " id="handle_cors-instance_method">
474
+
475
+ - (<tt>Object</tt>) <strong>handle_cors</strong>
476
+
477
+
478
+
479
+
480
+
481
+ </h3><table class="source_code">
482
+ <tr>
483
+ <td>
484
+ <pre class="lines">
485
+
486
+
487
+ 32
488
+ 33
489
+ 34</pre>
490
+ </td>
491
+ <td>
492
+ <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 32</span>
493
+
494
+ <span class='kw'>def</span> <span class='id identifier rubyid_handle_cors'>handle_cors</span>
495
+ <span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='label'>nothing:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>status:</span> <span class='symbol'>:no_content</span><span class='rparen'>)</span>
496
+ <span class='kw'>end</span></pre>
497
+ </td>
498
+ </tr>
499
+ </table>
500
+ </div>
501
+
502
+ <div class="method_details ">
503
+ <h3 class="signature " id="render_error-instance_method">
504
+
505
+ - (<tt>Object</tt>) <strong>render_error</strong>(status, errors)
506
+
507
+
508
+
509
+
510
+
511
+ </h3><table class="source_code">
512
+ <tr>
513
+ <td>
514
+ <pre class="lines">
515
+
516
+
517
+ 36
518
+ 37
519
+ 38
520
+ 39
521
+ 40</pre>
522
+ </td>
523
+ <td>
524
+ <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 36</span>
525
+
526
+ <span class='kw'>def</span> <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='id identifier rubyid_errors'>errors</span><span class='rparen'>)</span>
527
+ <span class='ivar'>@errors</span> <span class='op'>=</span> <span class='id identifier rubyid_errors'>errors</span>
528
+ <span class='id identifier rubyid_status_code'>status_code</span> <span class='op'>=</span> <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Fixnum</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>:</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Utils</span><span class='op'>::</span><span class='const'>SYMBOL_TO_STATUS_CODE</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='int'>500</span><span class='rparen'>)</span>
529
+ <span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>errors/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_status_code'>status_code</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>status:</span> <span class='id identifier rubyid_status'>status</span><span class='rparen'>)</span>
530
+ <span class='kw'>end</span></pre>
531
+ </td>
532
+ </tr>
533
+ </table>
534
+ </div>
535
+
536
+ </div>
537
+
538
+ </div>
539
+
540
+ <div id="footer">
541
+ Generated on Sat May 21 10:44:46 2016 by
542
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
543
+ 0.8.7.6 (ruby-2.3.0).
544
+ </div>
545
+
546
+ </body>
547
+ </html>