dh_easy-router 0.0.6

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