ae_easy-config 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.travis.yml +7 -0
- data/.yardopts +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE +21 -0
- data/README.md +16 -0
- data/Rakefile +22 -0
- data/ae_easy-config.gemspec +49 -0
- data/doc/AeEasy/Config/Local.html +1049 -0
- data/doc/AeEasy/Config.html +144 -0
- data/doc/AeEasy.html +117 -0
- data/doc/_index.html +137 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +91 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +91 -0
- data/doc/js/app.js +292 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +123 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/ae_easy/config/local.rb +88 -0
- data/lib/ae_easy/config/version.rb +6 -0
- data/lib/ae_easy/config.rb +9 -0
- metadata +188 -0
@@ -0,0 +1,1049 @@
|
|
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::Config::Local
|
8
|
+
|
9
|
+
— 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::Config::Local";
|
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 (L)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../AeEasy.html" title="AeEasy (module)">AeEasy</a></span></span> » <span class='title'><span class='object_link'><a href="../Config.html" title="AeEasy::Config (module)">Config</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Local</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::Config::Local
|
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::Config::Local</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/ae_easy/config/local.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Manage configuration from a file.</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
118
|
+
<ul class="summary">
|
119
|
+
|
120
|
+
<li class="public ">
|
121
|
+
<span class="summary_signature">
|
122
|
+
|
123
|
+
<a href="#local-instance_method" title="#local (instance method)">#<strong>local</strong> ⇒ Hash<sup>?</sup> </a>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
</span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<span class="note title readonly">readonly</span>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'>
|
143
|
+
<p>Configuration loaded from local configuarion file (see #load).</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
</ul>
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<h2>
|
156
|
+
Class Method Summary
|
157
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
158
|
+
</h2>
|
159
|
+
|
160
|
+
<ul class="summary">
|
161
|
+
|
162
|
+
<li class="public ">
|
163
|
+
<span class="summary_signature">
|
164
|
+
|
165
|
+
<a href="#clear_cache-class_method" title="clear_cache (class method)">.<strong>clear_cache</strong> ⇒ Object </a>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
</span>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<span class="summary_desc"><div class='inline'>
|
180
|
+
<p>Clear cache.</p>
|
181
|
+
</div></span>
|
182
|
+
|
183
|
+
</li>
|
184
|
+
|
185
|
+
|
186
|
+
<li class="public ">
|
187
|
+
<span class="summary_signature">
|
188
|
+
|
189
|
+
<a href="#load_file-class_method" title="load_file (class method)">.<strong>load_file</strong>(file_path, opts = {}) ⇒ Hash </a>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
</span>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<span class="summary_desc"><div class='inline'>
|
204
|
+
<p>Load into or from cache a configuration file contents.</p>
|
205
|
+
</div></span>
|
206
|
+
|
207
|
+
</li>
|
208
|
+
|
209
|
+
|
210
|
+
</ul>
|
211
|
+
|
212
|
+
<h2>
|
213
|
+
Instance Method Summary
|
214
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
215
|
+
</h2>
|
216
|
+
|
217
|
+
<ul class="summary">
|
218
|
+
|
219
|
+
<li class="public ">
|
220
|
+
<span class="summary_signature">
|
221
|
+
|
222
|
+
<a href="#[]-instance_method" title="#[] (instance method)">#<strong>[]</strong>(key) ⇒ Object<sup>?</sup> </a>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
</span>
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
<span class="summary_desc"><div class='inline'>
|
237
|
+
<p>Get configuration key contents.</p>
|
238
|
+
</div></span>
|
239
|
+
|
240
|
+
</li>
|
241
|
+
|
242
|
+
|
243
|
+
<li class="public ">
|
244
|
+
<span class="summary_signature">
|
245
|
+
|
246
|
+
<a href="#file_path-instance_method" title="#file_path (instance method)">#<strong>file_path</strong> ⇒ String </a>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
</span>
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
<span class="summary_desc"><div class='inline'>
|
261
|
+
<p>Local configuration file path.</p>
|
262
|
+
</div></span>
|
263
|
+
|
264
|
+
</li>
|
265
|
+
|
266
|
+
|
267
|
+
<li class="public ">
|
268
|
+
<span class="summary_signature">
|
269
|
+
|
270
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(opts = {}) ⇒ Local </a>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
</span>
|
275
|
+
|
276
|
+
|
277
|
+
<span class="note title constructor">constructor</span>
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
<span class="summary_desc"><div class='inline'>
|
287
|
+
<p>Initialize.</p>
|
288
|
+
</div></span>
|
289
|
+
|
290
|
+
</li>
|
291
|
+
|
292
|
+
|
293
|
+
<li class="public ">
|
294
|
+
<span class="summary_signature">
|
295
|
+
|
296
|
+
<a href="#load-instance_method" title="#load (instance method)">#<strong>load</strong>(opts = {}) ⇒ Object </a>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
</span>
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
<span class="summary_desc"><div class='inline'>
|
311
|
+
<p>Loads a local configuration file.</p>
|
312
|
+
</div></span>
|
313
|
+
|
314
|
+
</li>
|
315
|
+
|
316
|
+
|
317
|
+
<li class="public ">
|
318
|
+
<span class="summary_signature">
|
319
|
+
|
320
|
+
<a href="#reload-instance_method" title="#reload (instance method)">#<strong>reload</strong> ⇒ Object </a>
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
</span>
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
<span class="summary_desc"><div class='inline'>
|
335
|
+
<p>Reloads local configuration file.</p>
|
336
|
+
</div></span>
|
337
|
+
|
338
|
+
</li>
|
339
|
+
|
340
|
+
|
341
|
+
<li class="public ">
|
342
|
+
<span class="summary_signature">
|
343
|
+
|
344
|
+
<a href="#to_h-instance_method" title="#to_h (instance method)">#<strong>to_h</strong> ⇒ Hash </a>
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
</span>
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
<span class="summary_desc"><div class='inline'>
|
359
|
+
<p>Convert to hash.</p>
|
360
|
+
</div></span>
|
361
|
+
|
362
|
+
</li>
|
363
|
+
|
364
|
+
|
365
|
+
</ul>
|
366
|
+
|
367
|
+
|
368
|
+
<div id="constructor_details" class="method_details_list">
|
369
|
+
<h2>Constructor Details</h2>
|
370
|
+
|
371
|
+
<div class="method_details first">
|
372
|
+
<h3 class="signature first" id="initialize-instance_method">
|
373
|
+
|
374
|
+
#<strong>initialize</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="" title="AeEasy::Config::Local (class)">Local</a></span></tt>
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
</h3><div class="docstring">
|
381
|
+
<div class="discussion">
|
382
|
+
|
383
|
+
<p>Initialize.</p>
|
384
|
+
|
385
|
+
|
386
|
+
</div>
|
387
|
+
</div>
|
388
|
+
<div class="tags">
|
389
|
+
<p class="tag_title">Parameters:</p>
|
390
|
+
<ul class="param">
|
391
|
+
|
392
|
+
<li>
|
393
|
+
|
394
|
+
<span class='name'>opts</span>
|
395
|
+
|
396
|
+
|
397
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
398
|
+
|
399
|
+
|
400
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
401
|
+
|
402
|
+
|
403
|
+
—
|
404
|
+
<div class='inline'>
|
405
|
+
<p>({}) Configuration options (see #load).</p>
|
406
|
+
</div>
|
407
|
+
|
408
|
+
</li>
|
409
|
+
|
410
|
+
</ul>
|
411
|
+
|
412
|
+
|
413
|
+
</div><table class="source_code">
|
414
|
+
<tr>
|
415
|
+
<td>
|
416
|
+
<pre class="lines">
|
417
|
+
|
418
|
+
|
419
|
+
83
|
420
|
+
84
|
421
|
+
85</pre>
|
422
|
+
</td>
|
423
|
+
<td>
|
424
|
+
<pre class="code"><span class="info file"># File 'lib/ae_easy/config/local.rb', line 83</span>
|
425
|
+
|
426
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
427
|
+
<span class='id identifier rubyid_load'>load</span> <span class='id identifier rubyid_opts'>opts</span>
|
428
|
+
<span class='kw'>end</span></pre>
|
429
|
+
</td>
|
430
|
+
</tr>
|
431
|
+
</table>
|
432
|
+
</div>
|
433
|
+
|
434
|
+
</div>
|
435
|
+
|
436
|
+
<div id="instance_attr_details" class="attr_details">
|
437
|
+
<h2>Instance Attribute Details</h2>
|
438
|
+
|
439
|
+
|
440
|
+
<span id=""></span>
|
441
|
+
<div class="method_details first">
|
442
|
+
<h3 class="signature first" id="local-instance_method">
|
443
|
+
|
444
|
+
#<strong>local</strong> ⇒ <tt>Hash</tt><sup>?</sup> <span class="extras">(readonly)</span>
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
</h3><div class="docstring">
|
451
|
+
<div class="discussion">
|
452
|
+
|
453
|
+
<p>Configuration loaded from local configuarion file (see #load).</p>
|
454
|
+
|
455
|
+
|
456
|
+
</div>
|
457
|
+
</div>
|
458
|
+
<div class="tags">
|
459
|
+
|
460
|
+
<p class="tag_title">Returns:</p>
|
461
|
+
<ul class="return">
|
462
|
+
|
463
|
+
<li>
|
464
|
+
|
465
|
+
|
466
|
+
<span class='type'>(<tt>Hash</tt>, <tt>nil</tt>)</span>
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
—
|
471
|
+
<div class='inline'>
|
472
|
+
<p>`nil` when nothing has been loaded.</p>
|
473
|
+
</div>
|
474
|
+
|
475
|
+
</li>
|
476
|
+
|
477
|
+
</ul>
|
478
|
+
|
479
|
+
</div><table class="source_code">
|
480
|
+
<tr>
|
481
|
+
<td>
|
482
|
+
<pre class="lines">
|
483
|
+
|
484
|
+
|
485
|
+
8
|
486
|
+
9
|
487
|
+
10</pre>
|
488
|
+
</td>
|
489
|
+
<td>
|
490
|
+
<pre class="code"><span class="info file"># File 'lib/ae_easy/config/local.rb', line 8</span>
|
491
|
+
|
492
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_local'>local</span>
|
493
|
+
<span class='ivar'>@local</span>
|
494
|
+
<span class='kw'>end</span></pre>
|
495
|
+
</td>
|
496
|
+
</tr>
|
497
|
+
</table>
|
498
|
+
</div>
|
499
|
+
|
500
|
+
</div>
|
501
|
+
|
502
|
+
|
503
|
+
<div id="class_method_details" class="method_details_list">
|
504
|
+
<h2>Class Method Details</h2>
|
505
|
+
|
506
|
+
|
507
|
+
<div class="method_details first">
|
508
|
+
<h3 class="signature first" id="clear_cache-class_method">
|
509
|
+
|
510
|
+
.<strong>clear_cache</strong> ⇒ <tt>Object</tt>
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
</h3><div class="docstring">
|
517
|
+
<div class="discussion">
|
518
|
+
|
519
|
+
<p>Clear cache.</p>
|
520
|
+
|
521
|
+
|
522
|
+
</div>
|
523
|
+
</div>
|
524
|
+
<div class="tags">
|
525
|
+
|
526
|
+
|
527
|
+
</div><table class="source_code">
|
528
|
+
<tr>
|
529
|
+
<td>
|
530
|
+
<pre class="lines">
|
531
|
+
|
532
|
+
|
533
|
+
11
|
534
|
+
12
|
535
|
+
13</pre>
|
536
|
+
</td>
|
537
|
+
<td>
|
538
|
+
<pre class="code"><span class="info file"># File 'lib/ae_easy/config/local.rb', line 11</span>
|
539
|
+
|
540
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_clear_cache'>clear_cache</span>
|
541
|
+
<span class='cvar'>@@local</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
542
|
+
<span class='kw'>end</span></pre>
|
543
|
+
</td>
|
544
|
+
</tr>
|
545
|
+
</table>
|
546
|
+
</div>
|
547
|
+
|
548
|
+
<div class="method_details ">
|
549
|
+
<h3 class="signature " id="load_file-class_method">
|
550
|
+
|
551
|
+
.<strong>load_file</strong>(file_path, opts = {}) ⇒ <tt>Hash</tt>
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
</h3><div class="docstring">
|
558
|
+
<div class="discussion">
|
559
|
+
|
560
|
+
<p>Load into or from cache a configuration file contents.</p>
|
561
|
+
|
562
|
+
|
563
|
+
</div>
|
564
|
+
</div>
|
565
|
+
<div class="tags">
|
566
|
+
<p class="tag_title">Parameters:</p>
|
567
|
+
<ul class="param">
|
568
|
+
|
569
|
+
<li>
|
570
|
+
|
571
|
+
<span class='name'>file_path</span>
|
572
|
+
|
573
|
+
|
574
|
+
<span class='type'>(<tt>String</tt>)</span>
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
—
|
579
|
+
<div class='inline'>
|
580
|
+
<p>Configuration file path.</p>
|
581
|
+
</div>
|
582
|
+
|
583
|
+
</li>
|
584
|
+
|
585
|
+
<li>
|
586
|
+
|
587
|
+
<span class='name'>opts</span>
|
588
|
+
|
589
|
+
|
590
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
591
|
+
|
592
|
+
|
593
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
594
|
+
|
595
|
+
|
596
|
+
—
|
597
|
+
<div class='inline'>
|
598
|
+
<p>({}) Configuration options.</p>
|
599
|
+
</div>
|
600
|
+
|
601
|
+
</li>
|
602
|
+
|
603
|
+
</ul>
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
611
|
+
<ul class="option">
|
612
|
+
|
613
|
+
<li>
|
614
|
+
<span class="name">:force</span>
|
615
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
616
|
+
<span class="default">
|
617
|
+
|
618
|
+
— default:
|
619
|
+
<tt>false</tt>
|
620
|
+
|
621
|
+
</span>
|
622
|
+
|
623
|
+
— <div class='inline'>
|
624
|
+
<p>Will reload configuration file when `true`.</p>
|
625
|
+
</div>
|
626
|
+
|
627
|
+
</li>
|
628
|
+
|
629
|
+
</ul>
|
630
|
+
|
631
|
+
|
632
|
+
<p class="tag_title">Returns:</p>
|
633
|
+
<ul class="return">
|
634
|
+
|
635
|
+
<li>
|
636
|
+
|
637
|
+
|
638
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
—
|
643
|
+
<div class='inline'>
|
644
|
+
<p>Configuration file contents.</p>
|
645
|
+
</div>
|
646
|
+
|
647
|
+
</li>
|
648
|
+
|
649
|
+
</ul>
|
650
|
+
|
651
|
+
</div><table class="source_code">
|
652
|
+
<tr>
|
653
|
+
<td>
|
654
|
+
<pre class="lines">
|
655
|
+
|
656
|
+
|
657
|
+
30
|
658
|
+
31
|
659
|
+
32
|
660
|
+
33
|
661
|
+
34
|
662
|
+
35
|
663
|
+
36
|
664
|
+
37
|
665
|
+
38
|
666
|
+
39
|
667
|
+
40</pre>
|
668
|
+
</td>
|
669
|
+
<td>
|
670
|
+
<pre class="code"><span class="info file"># File 'lib/ae_easy/config/local.rb', line 30</span>
|
671
|
+
|
672
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_file'>load_file</span> <span class='id identifier rubyid_file_path'>file_path</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
673
|
+
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
674
|
+
<span class='label'>force:</span> <span class='kw'>false</span>
|
675
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
|
676
|
+
<span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_file_path'>file_path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_file_path'>file_path</span>
|
677
|
+
<span class='cvar'>@@local</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
678
|
+
<span class='kw'>return</span> <span class='cvar'>@@local</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:force</span><span class='rbracket'>]</span> <span class='op'>&&</span> <span class='cvar'>@@local</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
679
|
+
|
680
|
+
<span class='cvar'>@@local</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_load_file'>load_file</span><span class='lparen'>(</span><span class='id identifier rubyid_file_path'>file_path</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
681
|
+
<span class='cvar'>@@local</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span>
|
682
|
+
<span class='kw'>end</span></pre>
|
683
|
+
</td>
|
684
|
+
</tr>
|
685
|
+
</table>
|
686
|
+
</div>
|
687
|
+
|
688
|
+
</div>
|
689
|
+
|
690
|
+
<div id="instance_method_details" class="method_details_list">
|
691
|
+
<h2>Instance Method Details</h2>
|
692
|
+
|
693
|
+
|
694
|
+
<div class="method_details first">
|
695
|
+
<h3 class="signature first" id="[]-instance_method">
|
696
|
+
|
697
|
+
#<strong>[]</strong>(key) ⇒ <tt>Object</tt><sup>?</sup>
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
</h3><div class="docstring">
|
704
|
+
<div class="discussion">
|
705
|
+
|
706
|
+
<p>Get configuration key contents.</p>
|
707
|
+
|
708
|
+
|
709
|
+
</div>
|
710
|
+
</div>
|
711
|
+
<div class="tags">
|
712
|
+
<p class="tag_title">Parameters:</p>
|
713
|
+
<ul class="param">
|
714
|
+
|
715
|
+
<li>
|
716
|
+
|
717
|
+
<span class='name'>key</span>
|
718
|
+
|
719
|
+
|
720
|
+
<span class='type'>(<tt>String</tt>)</span>
|
721
|
+
|
722
|
+
|
723
|
+
|
724
|
+
—
|
725
|
+
<div class='inline'>
|
726
|
+
<p>Configuration option key.</p>
|
727
|
+
</div>
|
728
|
+
|
729
|
+
</li>
|
730
|
+
|
731
|
+
</ul>
|
732
|
+
|
733
|
+
<p class="tag_title">Returns:</p>
|
734
|
+
<ul class="return">
|
735
|
+
|
736
|
+
<li>
|
737
|
+
|
738
|
+
|
739
|
+
<span class='type'>(<tt>Object</tt>, <tt>nil</tt>)</span>
|
740
|
+
|
741
|
+
|
742
|
+
|
743
|
+
</li>
|
744
|
+
|
745
|
+
</ul>
|
746
|
+
|
747
|
+
</div><table class="source_code">
|
748
|
+
<tr>
|
749
|
+
<td>
|
750
|
+
<pre class="lines">
|
751
|
+
|
752
|
+
|
753
|
+
47
|
754
|
+
48
|
755
|
+
49</pre>
|
756
|
+
</td>
|
757
|
+
<td>
|
758
|
+
<pre class="code"><span class="info file"># File 'lib/ae_easy/config/local.rb', line 47</span>
|
759
|
+
|
760
|
+
<span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
761
|
+
<span class='id identifier rubyid_local'>local</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span>
|
762
|
+
<span class='kw'>end</span></pre>
|
763
|
+
</td>
|
764
|
+
</tr>
|
765
|
+
</table>
|
766
|
+
</div>
|
767
|
+
|
768
|
+
<div class="method_details ">
|
769
|
+
<h3 class="signature " id="file_path-instance_method">
|
770
|
+
|
771
|
+
#<strong>file_path</strong> ⇒ <tt>String</tt>
|
772
|
+
|
773
|
+
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
</h3><div class="docstring">
|
778
|
+
<div class="discussion">
|
779
|
+
|
780
|
+
<p>Local configuration file path.</p>
|
781
|
+
|
782
|
+
|
783
|
+
</div>
|
784
|
+
</div>
|
785
|
+
<div class="tags">
|
786
|
+
|
787
|
+
<p class="tag_title">Returns:</p>
|
788
|
+
<ul class="return">
|
789
|
+
|
790
|
+
<li>
|
791
|
+
|
792
|
+
|
793
|
+
<span class='type'>(<tt>String</tt>)</span>
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
—
|
798
|
+
<div class='inline'>
|
799
|
+
<p>Configuration local file path. Default is `./ae_easy.yaml`</p>
|
800
|
+
</div>
|
801
|
+
|
802
|
+
</li>
|
803
|
+
|
804
|
+
</ul>
|
805
|
+
|
806
|
+
</div><table class="source_code">
|
807
|
+
<tr>
|
808
|
+
<td>
|
809
|
+
<pre class="lines">
|
810
|
+
|
811
|
+
|
812
|
+
55
|
813
|
+
56
|
814
|
+
57</pre>
|
815
|
+
</td>
|
816
|
+
<td>
|
817
|
+
<pre class="code"><span class="info file"># File 'lib/ae_easy/config/local.rb', line 55</span>
|
818
|
+
|
819
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_file_path'>file_path</span>
|
820
|
+
<span class='ivar'>@file_path</span> <span class='op'>||=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ae_easy.yaml</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
821
|
+
<span class='kw'>end</span></pre>
|
822
|
+
</td>
|
823
|
+
</tr>
|
824
|
+
</table>
|
825
|
+
</div>
|
826
|
+
|
827
|
+
<div class="method_details ">
|
828
|
+
<h3 class="signature " id="load-instance_method">
|
829
|
+
|
830
|
+
#<strong>load</strong>(opts = {}) ⇒ <tt>Object</tt>
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
</h3><div class="docstring">
|
837
|
+
<div class="discussion">
|
838
|
+
|
839
|
+
<p>Loads a local configuration file.</p>
|
840
|
+
|
841
|
+
|
842
|
+
</div>
|
843
|
+
</div>
|
844
|
+
<div class="tags">
|
845
|
+
<p class="tag_title">Parameters:</p>
|
846
|
+
<ul class="param">
|
847
|
+
|
848
|
+
<li>
|
849
|
+
|
850
|
+
<span class='name'>opts</span>
|
851
|
+
|
852
|
+
|
853
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
854
|
+
|
855
|
+
|
856
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
857
|
+
|
858
|
+
|
859
|
+
—
|
860
|
+
<div class='inline'>
|
861
|
+
<p>({}) Configuration options.</p>
|
862
|
+
</div>
|
863
|
+
|
864
|
+
</li>
|
865
|
+
|
866
|
+
</ul>
|
867
|
+
|
868
|
+
|
869
|
+
|
870
|
+
|
871
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
872
|
+
<ul class="option">
|
873
|
+
|
874
|
+
<li>
|
875
|
+
<span class="name">:file_path</span>
|
876
|
+
<span class="type">(<tt>String</tt>)</span>
|
877
|
+
<span class="default">
|
878
|
+
|
879
|
+
— default:
|
880
|
+
<tt>nil</tt>
|
881
|
+
|
882
|
+
</span>
|
883
|
+
|
884
|
+
— <div class='inline'>
|
885
|
+
<p>Configuration file path to load (see #file_path for configuration default
|
886
|
+
file.)</p>
|
887
|
+
</div>
|
888
|
+
|
889
|
+
</li>
|
890
|
+
|
891
|
+
<li>
|
892
|
+
<span class="name">:force</span>
|
893
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
894
|
+
<span class="default">
|
895
|
+
|
896
|
+
— default:
|
897
|
+
<tt>false</tt>
|
898
|
+
|
899
|
+
</span>
|
900
|
+
|
901
|
+
— <div class='inline'>
|
902
|
+
<p>Will reload configuration file when `true`.</p>
|
903
|
+
</div>
|
904
|
+
|
905
|
+
</li>
|
906
|
+
|
907
|
+
</ul>
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
</div><table class="source_code">
|
912
|
+
<tr>
|
913
|
+
<td>
|
914
|
+
<pre class="lines">
|
915
|
+
|
916
|
+
|
917
|
+
66
|
918
|
+
67
|
919
|
+
68
|
920
|
+
69
|
921
|
+
70
|
922
|
+
71
|
923
|
+
72
|
924
|
+
73</pre>
|
925
|
+
</td>
|
926
|
+
<td>
|
927
|
+
<pre class="code"><span class="info file"># File 'lib/ae_easy/config/local.rb', line 66</span>
|
928
|
+
|
929
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load'>load</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
930
|
+
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
931
|
+
<span class='label'>file_path:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
932
|
+
<span class='label'>force:</span> <span class='kw'>false</span>
|
933
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
|
934
|
+
<span class='ivar'>@file_path</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:file_path</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_file_path'>file_path</span>
|
935
|
+
<span class='ivar'>@local</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_load_file'>load_file</span><span class='lparen'>(</span><span class='id identifier rubyid_file_path'>file_path</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
936
|
+
<span class='kw'>end</span></pre>
|
937
|
+
</td>
|
938
|
+
</tr>
|
939
|
+
</table>
|
940
|
+
</div>
|
941
|
+
|
942
|
+
<div class="method_details ">
|
943
|
+
<h3 class="signature " id="reload-instance_method">
|
944
|
+
|
945
|
+
#<strong>reload</strong> ⇒ <tt>Object</tt>
|
946
|
+
|
947
|
+
|
948
|
+
|
949
|
+
|
950
|
+
|
951
|
+
</h3><div class="docstring">
|
952
|
+
<div class="discussion">
|
953
|
+
|
954
|
+
<p>Reloads local configuration file.</p>
|
955
|
+
|
956
|
+
|
957
|
+
</div>
|
958
|
+
</div>
|
959
|
+
<div class="tags">
|
960
|
+
|
961
|
+
|
962
|
+
</div><table class="source_code">
|
963
|
+
<tr>
|
964
|
+
<td>
|
965
|
+
<pre class="lines">
|
966
|
+
|
967
|
+
|
968
|
+
76
|
969
|
+
77
|
970
|
+
78</pre>
|
971
|
+
</td>
|
972
|
+
<td>
|
973
|
+
<pre class="code"><span class="info file"># File 'lib/ae_easy/config/local.rb', line 76</span>
|
974
|
+
|
975
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_reload'>reload</span>
|
976
|
+
<span class='id identifier rubyid_load'>load</span> <span class='label'>force:</span> <span class='kw'>true</span>
|
977
|
+
<span class='kw'>end</span></pre>
|
978
|
+
</td>
|
979
|
+
</tr>
|
980
|
+
</table>
|
981
|
+
</div>
|
982
|
+
|
983
|
+
<div class="method_details ">
|
984
|
+
<h3 class="signature " id="to_h-instance_method">
|
985
|
+
|
986
|
+
#<strong>to_h</strong> ⇒ <tt>Hash</tt>
|
987
|
+
|
988
|
+
|
989
|
+
|
990
|
+
|
991
|
+
|
992
|
+
</h3><div class="docstring">
|
993
|
+
<div class="discussion">
|
994
|
+
|
995
|
+
<p>Convert to hash.</p>
|
996
|
+
|
997
|
+
|
998
|
+
</div>
|
999
|
+
</div>
|
1000
|
+
<div class="tags">
|
1001
|
+
|
1002
|
+
<p class="tag_title">Returns:</p>
|
1003
|
+
<ul class="return">
|
1004
|
+
|
1005
|
+
<li>
|
1006
|
+
|
1007
|
+
|
1008
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1009
|
+
|
1010
|
+
|
1011
|
+
|
1012
|
+
</li>
|
1013
|
+
|
1014
|
+
</ul>
|
1015
|
+
|
1016
|
+
</div><table class="source_code">
|
1017
|
+
<tr>
|
1018
|
+
<td>
|
1019
|
+
<pre class="lines">
|
1020
|
+
|
1021
|
+
|
1022
|
+
18
|
1023
|
+
19
|
1024
|
+
20</pre>
|
1025
|
+
</td>
|
1026
|
+
<td>
|
1027
|
+
<pre class="code"><span class="info file"># File 'lib/ae_easy/config/local.rb', line 18</span>
|
1028
|
+
|
1029
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span>
|
1030
|
+
<span class='id identifier rubyid_local'>local</span>
|
1031
|
+
<span class='kw'>end</span></pre>
|
1032
|
+
</td>
|
1033
|
+
</tr>
|
1034
|
+
</table>
|
1035
|
+
</div>
|
1036
|
+
|
1037
|
+
</div>
|
1038
|
+
|
1039
|
+
</div>
|
1040
|
+
|
1041
|
+
<div id="footer">
|
1042
|
+
Generated on Tue Feb 26 16:14:45 2019 by
|
1043
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1044
|
+
0.9.18 (ruby-2.5.3).
|
1045
|
+
</div>
|
1046
|
+
|
1047
|
+
</div>
|
1048
|
+
</body>
|
1049
|
+
</html>
|