ae_easy-router 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CODE_OF_CONDUCT.md +1 -1
  3. data/Gemfile +1 -1
  4. data/LICENSE +1 -1
  5. data/README.md +8 -4
  6. data/Rakefile +0 -10
  7. data/ae_easy-router.gemspec +10 -13
  8. data/lib/ae_easy/router.rb +3 -10
  9. metadata +30 -89
  10. data/doc/AeEasy.html +0 -117
  11. data/doc/AeEasy/Core.html +0 -117
  12. data/doc/AeEasy/Core/Plugin.html +0 -117
  13. data/doc/AeEasy/Core/Plugin/ParserBehavior.html +0 -196
  14. data/doc/AeEasy/Core/Plugin/SeederBehavior.html +0 -196
  15. data/doc/AeEasy/Router.html +0 -146
  16. data/doc/AeEasy/Router/Parser.html +0 -366
  17. data/doc/AeEasy/Router/Plugin.html +0 -117
  18. data/doc/AeEasy/Router/Plugin/Router.html +0 -778
  19. data/doc/AeEasy/Router/Seeder.html +0 -345
  20. data/doc/_index.html +0 -202
  21. data/doc/class_list.html +0 -51
  22. data/doc/css/common.css +0 -1
  23. data/doc/css/full_list.css +0 -58
  24. data/doc/css/style.css +0 -496
  25. data/doc/file.README.html +0 -92
  26. data/doc/file_list.html +0 -56
  27. data/doc/frames.html +0 -17
  28. data/doc/index.html +0 -92
  29. data/doc/js/app.js +0 -292
  30. data/doc/js/full_list.js +0 -216
  31. data/doc/js/jquery.js +0 -4
  32. data/doc/method_list.html +0 -131
  33. data/doc/top-level-namespace.html +0 -110
  34. data/lib/ae_easy/router/parser.rb +0 -48
  35. data/lib/ae_easy/router/plugin.rb +0 -8
  36. data/lib/ae_easy/router/plugin/router.rb +0 -74
  37. data/lib/ae_easy/router/seeder.rb +0 -38
  38. data/lib/ae_easy/router/version.rb +0 -6
  39. data/lib/ae_easy_override/core.rb +0 -6
  40. data/lib/ae_easy_override/core/plugin.rb +0 -9
  41. data/lib/ae_easy_override/core/plugin/parser_behavior.rb +0 -11
  42. data/lib/ae_easy_override/core/plugin/seeder_behavior.rb +0 -11
@@ -1,146 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Module: AeEasy::Router
8
-
9
- &mdash; Documentation by YARD 0.9.18
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
- pathId = "AeEasy::Router";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (R)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../AeEasy.html" title="AeEasy (module)">AeEasy</a></span></span>
41
- &raquo;
42
- <span class="title">Router</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Module: AeEasy::Router
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
- <dl>
80
- <dt>Defined in:</dt>
81
- <dd>lib/ae_easy/router.rb<span class="defines">,<br />
82
- lib/ae_easy/router/parser.rb,<br /> lib/ae_easy/router/plugin.rb,<br /> lib/ae_easy/router/seeder.rb,<br /> lib/ae_easy/router/version.rb,<br /> lib/ae_easy/router/plugin/router.rb</span>
83
- </dd>
84
- </dl>
85
-
86
- </div>
87
-
88
- <h2>Defined Under Namespace</h2>
89
- <p class="children">
90
-
91
-
92
- <strong class="modules">Modules:</strong> <span class='object_link'><a href="Router/Plugin.html" title="AeEasy::Router::Plugin (module)">Plugin</a></span>
93
-
94
-
95
-
96
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Router/Parser.html" title="AeEasy::Router::Parser (class)">Parser</a></span>, <span class='object_link'><a href="Router/Seeder.html" title="AeEasy::Router::Seeder (class)">Seeder</a></span>
97
-
98
-
99
- </p>
100
-
101
-
102
- <h2>
103
- Constant Summary
104
- <small><a href="#" class="constants_summary_toggle">collapse</a></small>
105
- </h2>
106
-
107
- <dl class="constants">
108
-
109
- <dt id="VERSION-constant" class="">VERSION =
110
- <div class="docstring">
111
- <div class="discussion">
112
-
113
- <p>Gem version</p>
114
-
115
-
116
- </div>
117
- </div>
118
- <div class="tags">
119
-
120
-
121
- </div>
122
- </dt>
123
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.2</span><span class='tstring_end'>&quot;</span></span></pre></dd>
124
-
125
- </dl>
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- </div>
137
-
138
- <div id="footer">
139
- Generated on Fri Mar 8 15:05:28 2019 by
140
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
141
- 0.9.18 (ruby-2.5.3).
142
- </div>
143
-
144
- </div>
145
- </body>
146
- </html>
@@ -1,366 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: AeEasy::Router::Parser
8
-
9
- &mdash; Documentation by YARD 0.9.18
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
- pathId = "AeEasy::Router::Parser";
19
- relpath = '../../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../../_index.html">Index (P)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../../AeEasy.html" title="AeEasy (module)">AeEasy</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Router.html" title="AeEasy::Router (module)">Router</a></span></span>
41
- &raquo;
42
- <span class="title">Parser</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Class: AeEasy::Router::Parser
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">Object</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">AeEasy::Router::Parser</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
- <dl>
91
- <dt>Includes:</dt>
92
- <dd><span class='object_link'><a href="Plugin/Router.html" title="AeEasy::Router::Plugin::Router (module)">AeEasy::Router::Plugin::Router</a></span></dd>
93
- </dl>
94
-
95
-
96
-
97
-
98
-
99
-
100
- <dl>
101
- <dt>Defined in:</dt>
102
- <dd>lib/ae_easy/router/parser.rb</dd>
103
- </dl>
104
-
105
- </div>
106
-
107
- <h2>Overview</h2><div class="docstring">
108
- <div class="discussion">
109
-
110
- <p>Parser router designed to look over page_type for route to the right</p>
111
-
112
- <pre class="code ruby"><code class="ruby">parser class.
113
- </code></pre>
114
-
115
-
116
- </div>
117
- </div>
118
- <div class="tags">
119
-
120
-
121
- </div>
122
-
123
-
124
-
125
-
126
-
127
- <h2>Instance Attribute Summary</h2>
128
-
129
- <h3 class="inherited">Attributes included from <span class='object_link'><a href="Plugin/Router.html" title="AeEasy::Router::Plugin::Router (module)">AeEasy::Router::Plugin::Router</a></span></h3>
130
- <p class="inherited"><span class='object_link'><a href="Plugin/Router.html#local_config-instance_method" title="AeEasy::Router::Plugin::Router#local_config (method)">#local_config</a></span></p>
131
-
132
-
133
-
134
- <h2>
135
- Instance Method Summary
136
- <small><a href="#" class="summary_toggle">collapse</a></small>
137
- </h2>
138
-
139
- <ul class="summary">
140
-
141
- <li class="public ">
142
- <span class="summary_signature">
143
-
144
- <a href="#route-instance_method" title="#route (instance method)">#<strong>route</strong>(opts = {}) &#x21d2; Object </a>
145
-
146
-
147
-
148
- </span>
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
- <span class="summary_desc"><div class='inline'>
159
- <p>Execute the parser class with options as described by router
160
- configuration filtering by `page_type` and calling class&#39;s instance
161
- `parse` method.</p>
162
- </div></span>
163
-
164
- </li>
165
-
166
-
167
- </ul>
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
- <h3 class="inherited">Methods included from <span class='object_link'><a href="Plugin/Router.html" title="AeEasy::Router::Plugin::Router (module)">AeEasy::Router::Plugin::Router</a></span></h3>
180
- <p class="inherited"><span class='object_link'><a href="Plugin/Router.html#class_defined%3F-instance_method" title="AeEasy::Router::Plugin::Router#class_defined? (method)">#class_defined?</a></span>, <span class='object_link'><a href="Plugin/Router.html#config-instance_method" title="AeEasy::Router::Plugin::Router#config (method)">#config</a></span>, <span class='object_link'><a href="Plugin/Router.html#get_class-instance_method" title="AeEasy::Router::Plugin::Router#get_class (method)">#get_class</a></span>, <span class='object_link'><a href="Plugin/Router.html#initialize-instance_method" title="AeEasy::Router::Plugin::Router#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Plugin/Router.html#initialize_hook_router_plugin_router-instance_method" title="AeEasy::Router::Plugin::Router#initialize_hook_router_plugin_router (method)">#initialize_hook_router_plugin_router</a></span></p>
181
-
182
-
183
-
184
- <div id="instance_method_details" class="method_details_list">
185
- <h2>Instance Method Details</h2>
186
-
187
-
188
- <div class="method_details first">
189
- <h3 class="signature first" id="route-instance_method">
190
-
191
- #<strong>route</strong>(opts = {}) &#x21d2; <tt>Object</tt>
192
-
193
-
194
-
195
-
196
-
197
- </h3><div class="docstring">
198
- <div class="discussion">
199
-
200
- <div class="note notetag">
201
- <strong>Note:</strong>
202
- <div class='inline'>
203
- <p>Requires the route class to implement `parse` instance method.</p>
204
- </div>
205
- </div>
206
-
207
-
208
- <p>Execute the parser class with options as described by router</p>
209
-
210
- <pre class="code ruby"><code class="ruby">configuration filtering by `page_type` and calling class&#39;s instance
211
- `parse` method.
212
- </code></pre>
213
-
214
-
215
- </div>
216
- </div>
217
- <div class="tags">
218
- <p class="tag_title">Parameters:</p>
219
- <ul class="param">
220
-
221
- <li>
222
-
223
- <span class='name'>opts</span>
224
-
225
-
226
- <span class='type'>(<tt>Hash</tt>)</span>
227
-
228
-
229
- <em class="default">(defaults to: <tt>{}</tt>)</em>
230
-
231
-
232
- &mdash;
233
- <div class='inline'>
234
- <p>({}) Parser initializer options (see AeEasy::Core::Plugin::Parser).</p>
235
- </div>
236
-
237
- </li>
238
-
239
- </ul>
240
-
241
- <p class="tag_title">Raises:</p>
242
- <ul class="raise">
243
-
244
- <li>
245
-
246
-
247
- <span class='type'>(<tt>ArgumentError</tt>)</span>
248
-
249
-
250
-
251
- &mdash;
252
- <div class='inline'>
253
- <p>`<a href=":context">opts</a>` is `nil`.</p>
254
- </div>
255
-
256
- </li>
257
-
258
- <li>
259
-
260
-
261
- <span class='type'>(<tt>ArgumentError</tt>)</span>
262
-
263
-
264
-
265
- &mdash;
266
- <div class='inline'>
267
- <p>`page_type` doesn&#39;t exists within routes.</p>
268
- </div>
269
-
270
- </li>
271
-
272
- <li>
273
-
274
-
275
- <span class='type'>(<tt>NameError</tt>)</span>
276
-
277
-
278
-
279
- &mdash;
280
- <div class='inline'>
281
- <p>A class with name equal to route&#39;s `class` attribute doesn&#39;t
282
- exists.</p>
283
- </div>
284
-
285
- </li>
286
-
287
- </ul>
288
-
289
- </div><table class="source_code">
290
- <tr>
291
- <td>
292
- <pre class="lines">
293
-
294
-
295
- 21
296
- 22
297
- 23
298
- 24
299
- 25
300
- 26
301
- 27
302
- 28
303
- 29
304
- 30
305
- 31
306
- 32
307
- 33
308
- 34
309
- 35
310
- 36
311
- 37
312
- 38
313
- 39
314
- 40
315
- 41
316
- 42
317
- 43
318
- 44
319
- 45</pre>
320
- </td>
321
- <td>
322
- <pre class="code"><span class="info file"># File 'lib/ae_easy/router/parser.rb', line 21</span>
323
-
324
- <span class='kw'>def</span> <span class='id identifier rubyid_route'>route</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
325
- <span class='id identifier rubyid_context'>context</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:context</span><span class='rbracket'>]</span>
326
- <span class='kw'>if</span> <span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
327
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Must send a context to the parser.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
328
- <span class='kw'>end</span>
329
-
330
- <span class='id identifier rubyid_page_type'>page_type</span> <span class='op'>=</span> <span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_page'>page</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>page_type</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span>
331
- <span class='id identifier rubyid_class_name'>class_name</span> <span class='op'>=</span> <span class='kw'>nil</span>
332
- <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>parser</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>routes</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span>
333
- <span class='comment'># Look for page type
334
- </span> <span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>page_type</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span> <span class='op'>!=</span> <span class='id identifier rubyid_page_type'>page_type</span>
335
-
336
- <span class='comment'># Validate class name
337
- </span> <span class='id identifier rubyid_executor_class'>executor_class</span> <span class='op'>=</span> <span class='id identifier rubyid_get_class'>get_class</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>class</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
338
- <span class='kw'>if</span> <span class='id identifier rubyid_executor_class'>executor_class</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
339
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NameError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Class \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>class</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot; doesn&#39;t exists, check your ae_easy config file.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
340
- <span class='kw'>end</span>
341
-
342
- <span class='id identifier rubyid_executor_class'>executor_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span>
343
- <span class='kw'>return</span>
344
- <span class='kw'>end</span>
345
-
346
- <span class='comment'># Page type is not routed, raise an error.
347
- </span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Page type \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_page_type'>page_type</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot; is not routed, check your ae_easy config file.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
348
- <span class='kw'>end</span></pre>
349
- </td>
350
- </tr>
351
- </table>
352
- </div>
353
-
354
- </div>
355
-
356
- </div>
357
-
358
- <div id="footer">
359
- Generated on Fri Mar 8 15:05:28 2019 by
360
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
361
- 0.9.18 (ruby-2.5.3).
362
- </div>
363
-
364
- </div>
365
- </body>
366
- </html>