humidifier-reservoir 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,678 @@
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: Humidifier::Reservoir::Config
8
+
9
+ &mdash; Humidifier::Reservoir
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 = "Humidifier::Reservoir::Config";
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 (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Humidifier.html" title="Humidifier (module)">Humidifier</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Reservoir.html" title="Humidifier::Reservoir (module)">Reservoir</a></span></span>
41
+ &raquo;
42
+ <span class="title">Config</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: Humidifier::Reservoir::Config
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">Humidifier::Reservoir::Config</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/humidifier/reservoir/config.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>A container class for the user-specified Reservoir configuration.</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="#mappings-instance_method" title="#mappings (instance method)">#<strong>mappings</strong> &#x21d2; Object </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>Returns the value of attribute mappings.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#stack_path-instance_method" title="#stack_path (instance method)">#<strong>stack_path</strong> &#x21d2; Object </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'>
170
+ <p>Returns the value of attribute stack_path.</p>
171
+ </div></span>
172
+
173
+ </li>
174
+
175
+
176
+ <li class="public ">
177
+ <span class="summary_signature">
178
+
179
+ <a href="#stack_prefix-instance_method" title="#stack_prefix (instance method)">#<strong>stack_prefix</strong> &#x21d2; Object </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+ <span class="summary_desc"><div class='inline'>
197
+ <p>Returns the value of attribute stack_prefix.</p>
198
+ </div></span>
199
+
200
+ </li>
201
+
202
+
203
+ </ul>
204
+
205
+
206
+
207
+
208
+
209
+ <h2>
210
+ Instance Method Summary
211
+ <small><a href="#" class="summary_toggle">collapse</a></small>
212
+ </h2>
213
+
214
+ <ul class="summary">
215
+
216
+ <li class="public ">
217
+ <span class="summary_signature">
218
+
219
+ <a href="#files_for-instance_method" title="#files_for (instance method)">#<strong>files_for</strong>(name) &#x21d2; Object </a>
220
+
221
+
222
+
223
+ </span>
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+ <span class="summary_desc"><div class='inline'></div></span>
234
+
235
+ </li>
236
+
237
+
238
+ <li class="public ">
239
+ <span class="summary_signature">
240
+
241
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; Config </a>
242
+
243
+
244
+
245
+ </span>
246
+
247
+
248
+ <span class="note title constructor">constructor</span>
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+ <span class="summary_desc"><div class='inline'>
258
+ <p>A new instance of Config.</p>
259
+ </div></span>
260
+
261
+ </li>
262
+
263
+
264
+ <li class="public ">
265
+ <span class="summary_signature">
266
+
267
+ <a href="#map-instance_method" title="#map (instance method)">#<strong>map</strong>(type, opts = {}) &#x21d2; Object </a>
268
+
269
+
270
+
271
+ </span>
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+ <span class="summary_desc"><div class='inline'></div></span>
282
+
283
+ </li>
284
+
285
+
286
+ <li class="public ">
287
+ <span class="summary_signature">
288
+
289
+ <a href="#mapping_for-instance_method" title="#mapping_for (instance method)">#<strong>mapping_for</strong>(type) &#x21d2; Object </a>
290
+
291
+
292
+
293
+ </span>
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+ <span class="summary_desc"><div class='inline'></div></span>
304
+
305
+ </li>
306
+
307
+
308
+ <li class="public ">
309
+ <span class="summary_signature">
310
+
311
+ <a href="#stacks-instance_method" title="#stacks (instance method)">#<strong>stacks</strong> &#x21d2; Object </a>
312
+
313
+
314
+
315
+ </span>
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+ <span class="summary_desc"><div class='inline'></div></span>
326
+
327
+ </li>
328
+
329
+
330
+ </ul>
331
+
332
+
333
+ <div id="constructor_details" class="method_details_list">
334
+ <h2>Constructor Details</h2>
335
+
336
+ <div class="method_details first">
337
+ <h3 class="signature first" id="initialize-instance_method">
338
+
339
+ #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="Humidifier::Reservoir::Config (class)">Config</a></span></tt>
340
+
341
+
342
+
343
+
344
+
345
+ </h3><div class="docstring">
346
+ <div class="discussion">
347
+
348
+ <p>Returns a new instance of Config</p>
349
+
350
+
351
+ </div>
352
+ </div>
353
+ <div class="tags">
354
+
355
+
356
+ </div><table class="source_code">
357
+ <tr>
358
+ <td>
359
+ <pre class="lines">
360
+
361
+
362
+ 8
363
+ 9
364
+ 10</pre>
365
+ </td>
366
+ <td>
367
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/config.rb', line 8</span>
368
+
369
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
370
+ <span class='ivar'>@mappings</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
371
+ <span class='kw'>end</span></pre>
372
+ </td>
373
+ </tr>
374
+ </table>
375
+ </div>
376
+
377
+ </div>
378
+
379
+ <div id="instance_attr_details" class="attr_details">
380
+ <h2>Instance Attribute Details</h2>
381
+
382
+
383
+ <span id=""></span>
384
+ <div class="method_details first">
385
+ <h3 class="signature first" id="mappings-instance_method">
386
+
387
+ #<strong>mappings</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
388
+
389
+
390
+
391
+
392
+
393
+ </h3><div class="docstring">
394
+ <div class="discussion">
395
+
396
+ <p>Returns the value of attribute mappings</p>
397
+
398
+
399
+ </div>
400
+ </div>
401
+ <div class="tags">
402
+
403
+
404
+ </div><table class="source_code">
405
+ <tr>
406
+ <td>
407
+ <pre class="lines">
408
+
409
+
410
+ 5
411
+ 6
412
+ 7</pre>
413
+ </td>
414
+ <td>
415
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/config.rb', line 5</span>
416
+
417
+ <span class='kw'>def</span> <span class='id identifier rubyid_mappings'>mappings</span>
418
+ <span class='ivar'>@mappings</span>
419
+ <span class='kw'>end</span></pre>
420
+ </td>
421
+ </tr>
422
+ </table>
423
+ </div>
424
+
425
+
426
+ <span id="stack_path=-instance_method"></span>
427
+ <div class="method_details ">
428
+ <h3 class="signature " id="stack_path-instance_method">
429
+
430
+ #<strong>stack_path</strong> &#x21d2; <tt>Object</tt>
431
+
432
+
433
+
434
+
435
+
436
+ </h3><div class="docstring">
437
+ <div class="discussion">
438
+
439
+ <p>Returns the value of attribute stack_path</p>
440
+
441
+
442
+ </div>
443
+ </div>
444
+ <div class="tags">
445
+
446
+
447
+ </div><table class="source_code">
448
+ <tr>
449
+ <td>
450
+ <pre class="lines">
451
+
452
+
453
+ 5
454
+ 6
455
+ 7</pre>
456
+ </td>
457
+ <td>
458
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/config.rb', line 5</span>
459
+
460
+ <span class='kw'>def</span> <span class='id identifier rubyid_stack_path'>stack_path</span>
461
+ <span class='ivar'>@stack_path</span>
462
+ <span class='kw'>end</span></pre>
463
+ </td>
464
+ </tr>
465
+ </table>
466
+ </div>
467
+
468
+
469
+ <span id="stack_prefix=-instance_method"></span>
470
+ <div class="method_details ">
471
+ <h3 class="signature " id="stack_prefix-instance_method">
472
+
473
+ #<strong>stack_prefix</strong> &#x21d2; <tt>Object</tt>
474
+
475
+
476
+
477
+
478
+
479
+ </h3><div class="docstring">
480
+ <div class="discussion">
481
+
482
+ <p>Returns the value of attribute stack_prefix</p>
483
+
484
+
485
+ </div>
486
+ </div>
487
+ <div class="tags">
488
+
489
+
490
+ </div><table class="source_code">
491
+ <tr>
492
+ <td>
493
+ <pre class="lines">
494
+
495
+
496
+ 6
497
+ 7
498
+ 8</pre>
499
+ </td>
500
+ <td>
501
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/config.rb', line 6</span>
502
+
503
+ <span class='kw'>def</span> <span class='id identifier rubyid_stack_prefix'>stack_prefix</span>
504
+ <span class='ivar'>@stack_prefix</span>
505
+ <span class='kw'>end</span></pre>
506
+ </td>
507
+ </tr>
508
+ </table>
509
+ </div>
510
+
511
+ </div>
512
+
513
+
514
+ <div id="instance_method_details" class="method_details_list">
515
+ <h2>Instance Method Details</h2>
516
+
517
+
518
+ <div class="method_details first">
519
+ <h3 class="signature first" id="files_for-instance_method">
520
+
521
+ #<strong>files_for</strong>(name) &#x21d2; <tt>Object</tt>
522
+
523
+
524
+
525
+
526
+
527
+ </h3><div class="docstring">
528
+ <div class="discussion">
529
+
530
+
531
+ </div>
532
+ </div>
533
+ <div class="tags">
534
+
535
+ <p class="tag_title">Raises:</p>
536
+ <ul class="raise">
537
+
538
+ <li>
539
+
540
+
541
+ <span class='type'>(<tt><span class='object_link'><a href="Error.html" title="Humidifier::Reservoir::Error (class)">Error</a></span></tt>)</span>
542
+
543
+
544
+
545
+ </li>
546
+
547
+ </ul>
548
+
549
+ </div><table class="source_code">
550
+ <tr>
551
+ <td>
552
+ <pre class="lines">
553
+
554
+
555
+ 12
556
+ 13
557
+ 14
558
+ 15</pre>
559
+ </td>
560
+ <td>
561
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/config.rb', line 12</span>
562
+
563
+ <span class='kw'>def</span> <span class='id identifier rubyid_files_for'>files_for</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
564
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="Error.html" title="Humidifier::Reservoir::Error (class)">Error</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>You must configure a stack path</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_stack_path'>stack_path</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
565
+ <span class='const'>Dir</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_stack_path'>stack_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>/*.yml</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
566
+ <span class='kw'>end</span></pre>
567
+ </td>
568
+ </tr>
569
+ </table>
570
+ </div>
571
+
572
+ <div class="method_details ">
573
+ <h3 class="signature " id="map-instance_method">
574
+
575
+ #<strong>map</strong>(type, opts = {}) &#x21d2; <tt>Object</tt>
576
+
577
+
578
+
579
+
580
+
581
+ </h3><table class="source_code">
582
+ <tr>
583
+ <td>
584
+ <pre class="lines">
585
+
586
+
587
+ 17
588
+ 18
589
+ 19</pre>
590
+ </td>
591
+ <td>
592
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/config.rb', line 17</span>
593
+
594
+ <span class='kw'>def</span> <span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</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><span class='rparen'>)</span>
595
+ <span class='id identifier rubyid_mappings'>mappings</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Mapping.html" title="Humidifier::Reservoir::Mapping (class)">Mapping</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Mapping.html#initialize-instance_method" title="Humidifier::Reservoir::Mapping#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
596
+ <span class='kw'>end</span></pre>
597
+ </td>
598
+ </tr>
599
+ </table>
600
+ </div>
601
+
602
+ <div class="method_details ">
603
+ <h3 class="signature " id="mapping_for-instance_method">
604
+
605
+ #<strong>mapping_for</strong>(type) &#x21d2; <tt>Object</tt>
606
+
607
+
608
+
609
+
610
+
611
+ </h3><table class="source_code">
612
+ <tr>
613
+ <td>
614
+ <pre class="lines">
615
+
616
+
617
+ 21
618
+ 22
619
+ 23</pre>
620
+ </td>
621
+ <td>
622
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/config.rb', line 21</span>
623
+
624
+ <span class='kw'>def</span> <span class='id identifier rubyid_mapping_for'>mapping_for</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
625
+ <span class='id identifier rubyid_mappings'>mappings</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span>
626
+ <span class='kw'>end</span></pre>
627
+ </td>
628
+ </tr>
629
+ </table>
630
+ </div>
631
+
632
+ <div class="method_details ">
633
+ <h3 class="signature " id="stacks-instance_method">
634
+
635
+ #<strong>stacks</strong> &#x21d2; <tt>Object</tt>
636
+
637
+
638
+
639
+
640
+
641
+ </h3><table class="source_code">
642
+ <tr>
643
+ <td>
644
+ <pre class="lines">
645
+
646
+
647
+ 30
648
+ 31
649
+ 32
650
+ 33
651
+ 34</pre>
652
+ </td>
653
+ <td>
654
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/config.rb', line 30</span>
655
+
656
+ <span class='kw'>def</span> <span class='id identifier rubyid_stacks'>stacks</span>
657
+ <span class='const'>Dir</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_stack_path'>stack_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/*</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each_with_object'>each_with_object</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_names'>names</span><span class='op'>|</span>
658
+ <span class='id identifier rubyid_names'>names</span> <span class='op'>&lt;&lt;</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_directory?'>directory?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
659
+ <span class='kw'>end</span>
660
+ <span class='kw'>end</span></pre>
661
+ </td>
662
+ </tr>
663
+ </table>
664
+ </div>
665
+
666
+ </div>
667
+
668
+ </div>
669
+
670
+ <div id="footer">
671
+ Generated on Sun Oct 1 09:25:22 2017 by
672
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
673
+ 0.9.9 (ruby-2.4.1).
674
+ </div>
675
+
676
+ </div>
677
+ </body>
678
+ </html>