ec2-host 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -264,7 +264,7 @@
264
264
  </div>
265
265
 
266
266
  <div id="footer">
267
- Generated on Thu Nov 24 10:25:37 2016 by
267
+ Generated on Fri Dec 2 11:54:00 2016 by
268
268
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
269
269
  0.8.7.6 (ruby-2.3.2).
270
270
  </div>
@@ -169,7 +169,7 @@
169
169
  </div>
170
170
 
171
171
  <div id="footer">
172
- Generated on Thu Nov 24 10:25:36 2016 by
172
+ Generated on Fri Dec 2 11:53:59 2016 by
173
173
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
174
174
  0.8.7.6 (ruby-2.3.2).
175
175
  </div>
@@ -1763,7 +1763,7 @@ href="'AWS_REGION'">ENV</a>, :instance, # Aws::EC2::Types::Instance itself</p>
1763
1763
  </div>
1764
1764
 
1765
1765
  <div id="footer">
1766
- Generated on Thu Nov 24 10:25:36 2016 by
1766
+ Generated on Fri Dec 2 11:54:00 2016 by
1767
1767
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1768
1768
  0.8.7.6 (ruby-2.3.2).
1769
1769
  </div>
@@ -114,98 +114,6 @@
114
114
 
115
115
 
116
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="#role1-instance_method" title="#role1 (instance method)">- (Object) <strong>role1</strong> </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 role1.</p>
144
- </div></span>
145
-
146
- </li>
147
-
148
-
149
- <li class="public ">
150
- <span class="summary_signature">
151
-
152
- <a href="#role2-instance_method" title="#role2 (instance method)">- (Object) <strong>role2</strong> </a>
153
-
154
-
155
-
156
- </span>
157
-
158
-
159
-
160
-
161
- <span class="note title readonly">readonly</span>
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
- <span class="summary_desc"><div class='inline'>
172
- <p>Returns the value of attribute role2.</p>
173
- </div></span>
174
-
175
- </li>
176
-
177
-
178
- <li class="public ">
179
- <span class="summary_signature">
180
-
181
- <a href="#role3-instance_method" title="#role3 (instance method)">- (Object) <strong>role3</strong> </a>
182
-
183
-
184
-
185
- </span>
186
-
187
-
188
-
189
-
190
- <span class="note title readonly">readonly</span>
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
- <span class="summary_desc"><div class='inline'>
201
- <p>Returns the value of attribute role3.</p>
202
- </div></span>
203
-
204
- </li>
205
-
206
-
207
- </ul>
208
-
209
117
 
210
118
 
211
119
 
@@ -234,7 +142,9 @@
234
142
 
235
143
 
236
144
 
237
- <span class="summary_desc"><div class='inline'></div></span>
145
+ <span class="summary_desc"><div class='inline'>
146
+ <p>Create a role data with role delimiter by Config.role_tag_delimiter.</p>
147
+ </div></span>
238
148
 
239
149
  </li>
240
150
 
@@ -275,7 +185,7 @@
275
185
  <li class="public ">
276
186
  <span class="summary_signature">
277
187
 
278
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (RoleData) <strong>initialize</strong>(role1, role2 = nil, role3 = nil) </a>
188
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (RoleData) <strong>initialize</strong>(*role_parts) </a>
279
189
 
280
190
 
281
191
 
@@ -292,7 +202,7 @@
292
202
 
293
203
 
294
204
  <span class="summary_desc"><div class='inline'>
295
- <p>A new instance of RoleData.</p>
205
+ <p>Initialize role data with role parts.</p>
296
206
  </div></span>
297
207
 
298
208
  </li>
@@ -323,7 +233,7 @@
323
233
  <li class="public ">
324
234
  <span class="summary_signature">
325
235
 
326
- <a href="#match%3F-instance_method" title="#match? (instance method)">- (Boolean) <strong>match?</strong>(role1, role2 = nil, role3 = nil) </a>
236
+ <a href="#match%3F-instance_method" title="#match? (instance method)">- (Boolean) <strong>match?</strong>(*role_parts) </a>
327
237
 
328
238
 
329
239
 
@@ -337,7 +247,9 @@
337
247
 
338
248
 
339
249
 
340
- <span class="summary_desc"><div class='inline'></div></span>
250
+ <span class="summary_desc"><div class='inline'>
251
+ <p>Check whether given role parts matches with this role data object.</p>
252
+ </div></span>
341
253
 
342
254
  </li>
343
255
 
@@ -401,7 +313,7 @@
401
313
  <div class="method_details first">
402
314
  <h3 class="signature first" id="initialize-instance_method">
403
315
 
404
- - (<tt><span class='object_link'><a href="" title="EC2::Host::RoleData (class)">RoleData</a></span></tt>) <strong>initialize</strong>(role1, role2 = nil, role3 = nil)
316
+ - (<tt><span class='object_link'><a href="" title="EC2::Host::RoleData (class)">RoleData</a></span></tt>) <strong>initialize</strong>(*role_parts)
405
317
 
406
318
 
407
319
 
@@ -410,65 +322,36 @@
410
322
  </h3><div class="docstring">
411
323
  <div class="discussion">
412
324
 
413
- <p>Returns a new instance of RoleData</p>
325
+ <p>Initialize role data with role parts</p>
326
+
327
+ <pre class="code ruby"><code class="ruby"><span class='const'>RoleData</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>slave</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
328
+ </code></pre>
414
329
 
415
330
 
416
331
  </div>
417
332
  </div>
418
333
  <div class="tags">
334
+ <p class="tag_title">Parameters:</p>
335
+ <ul class="param">
419
336
 
420
-
421
- </div><table class="source_code">
422
- <tr>
423
- <td>
424
- <pre class="lines">
425
-
426
-
427
- 7
428
- 8
429
- 9
430
- 10
431
- 11</pre>
432
- </td>
433
- <td>
434
- <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 7</span>
435
-
436
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_role1'>role1</span><span class='comma'>,</span> <span class='id identifier rubyid_role2'>role2</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_role3'>role3</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
437
- <span class='ivar'>@role1</span> <span class='op'>=</span> <span class='id identifier rubyid_role1'>role1</span>
438
- <span class='ivar'>@role2</span> <span class='op'>=</span> <span class='id identifier rubyid_role2'>role2</span>
439
- <span class='ivar'>@role3</span> <span class='op'>=</span> <span class='id identifier rubyid_role3'>role3</span>
440
- <span class='kw'>end</span></pre>
441
- </td>
442
- </tr>
443
- </table>
444
- </div>
445
-
337
+ <li>
338
+
339
+ <span class='name'>role_parts</span>
340
+
341
+
342
+ <span class='type'>(<tt>Array</tt>)</span>
343
+
344
+
345
+
346
+ &mdash;
347
+ <div class='inline'>
348
+ <p>such as [&#39;admin&#39;, &#39;jenkins&#39;, &#39;slave&#39;]</p>
446
349
  </div>
447
-
448
- <div id="instance_attr_details" class="attr_details">
449
- <h2>Instance Attribute Details</h2>
450
-
451
350
 
452
- <span id=""></span>
453
- <div class="method_details first">
454
- <h3 class="signature first" id="role1-instance_method">
455
-
456
- - (<tt>Object</tt>) <strong>role1</strong> <span class="extras">(readonly)</span>
457
-
458
-
459
-
460
-
351
+ </li>
461
352
 
462
- </h3><div class="docstring">
463
- <div class="discussion">
464
-
465
- <p>Returns the value of attribute role1</p>
466
-
353
+ </ul>
467
354
 
468
- </div>
469
- </div>
470
- <div class="tags">
471
-
472
355
 
473
356
  </div><table class="source_code">
474
357
  <tr>
@@ -476,70 +359,32 @@
476
359
  <pre class="lines">
477
360
 
478
361
 
479
- 5
480
- 6
481
- 7</pre>
362
+ 10
363
+ 11
364
+ 12</pre>
482
365
  </td>
483
366
  <td>
484
- <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 5</span>
367
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 10</span>
485
368
 
486
- <span class='kw'>def</span> <span class='id identifier rubyid_role1'>role1</span>
487
- <span class='ivar'>@role1</span>
369
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_role_parts'>role_parts</span><span class='rparen'>)</span>
370
+ <span class='ivar'>@role_parts</span> <span class='op'>=</span> <span class='id identifier rubyid_role_parts'>role_parts</span>
488
371
  <span class='kw'>end</span></pre>
489
372
  </td>
490
373
  </tr>
491
374
  </table>
492
375
  </div>
493
-
494
-
495
- <span id=""></span>
496
- <div class="method_details ">
497
- <h3 class="signature " id="role2-instance_method">
498
-
499
- - (<tt>Object</tt>) <strong>role2</strong> <span class="extras">(readonly)</span>
500
-
501
-
502
-
503
-
504
376
 
505
- </h3><div class="docstring">
506
- <div class="discussion">
507
-
508
- <p>Returns the value of attribute role2</p>
509
-
510
-
511
- </div>
512
377
  </div>
513
- <div class="tags">
514
-
515
378
 
516
- </div><table class="source_code">
517
- <tr>
518
- <td>
519
- <pre class="lines">
520
379
 
380
+ <div id="class_method_details" class="method_details_list">
381
+ <h2>Class Method Details</h2>
521
382
 
522
- 5
523
- 6
524
- 7</pre>
525
- </td>
526
- <td>
527
- <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 5</span>
528
-
529
- <span class='kw'>def</span> <span class='id identifier rubyid_role2'>role2</span>
530
- <span class='ivar'>@role2</span>
531
- <span class='kw'>end</span></pre>
532
- </td>
533
- </tr>
534
- </table>
535
- </div>
536
383
 
537
-
538
- <span id=""></span>
539
- <div class="method_details ">
540
- <h3 class="signature " id="role3-instance_method">
384
+ <div class="method_details first">
385
+ <h3 class="signature first" id="build-class_method">
541
386
 
542
- - (<tt>Object</tt>) <strong>role3</strong> <span class="extras">(readonly)</span>
387
+ + (<tt>Object</tt>) <strong>build</strong>(role)
543
388
 
544
389
 
545
390
 
@@ -548,68 +393,54 @@
548
393
  </h3><div class="docstring">
549
394
  <div class="discussion">
550
395
 
551
- <p>Returns the value of attribute role3</p>
396
+ <p>Create a role data with role delimiter by Config.role_tag_delimiter</p>
397
+
398
+ <pre class="code ruby"><code class="ruby"><span class='const'>RoleData</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>admin:jenkins:slave</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
399
+ </code></pre>
552
400
 
553
401
 
554
402
  </div>
555
403
  </div>
556
404
  <div class="tags">
405
+ <p class="tag_title">Parameters:</p>
406
+ <ul class="param">
557
407
 
558
-
559
- </div><table class="source_code">
560
- <tr>
561
- <td>
562
- <pre class="lines">
563
-
564
-
565
- 5
566
- 6
567
- 7</pre>
568
- </td>
569
- <td>
570
- <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 5</span>
571
-
572
- <span class='kw'>def</span> <span class='id identifier rubyid_role3'>role3</span>
573
- <span class='ivar'>@role3</span>
574
- <span class='kw'>end</span></pre>
575
- </td>
576
- </tr>
577
- </table>
408
+ <li>
409
+
410
+ <span class='name'>role</span>
411
+
412
+
413
+ <span class='type'>(<tt>String</tt>)</span>
414
+
415
+
416
+
417
+ &mdash;
418
+ <div class='inline'>
419
+ <p>such as “admin:jenkins:slave”</p>
578
420
  </div>
579
-
580
- </div>
581
-
582
-
583
- <div id="class_method_details" class="method_details_list">
584
- <h2>Class Method Details</h2>
585
-
586
-
587
- <div class="method_details first">
588
- <h3 class="signature first" id="build-class_method">
589
-
590
- + (<tt>Object</tt>) <strong>build</strong>(role)
421
+
422
+ </li>
591
423
 
424
+ </ul>
592
425
 
593
-
594
426
 
595
-
596
- </h3><table class="source_code">
427
+ </div><table class="source_code">
597
428
  <tr>
598
429
  <td>
599
430
  <pre class="lines">
600
431
 
601
432
 
602
- 13
603
- 14
604
- 15
605
- 16</pre>
433
+ 19
434
+ 20
435
+ 21
436
+ 22</pre>
606
437
  </td>
607
438
  <td>
608
- <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 13</span>
439
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 19</span>
609
440
 
610
441
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='id identifier rubyid_role'>role</span><span class='rparen'>)</span>
611
- <span class='id identifier rubyid_role1'>role1</span><span class='comma'>,</span> <span class='id identifier rubyid_role2'>role2</span><span class='comma'>,</span> <span class='id identifier rubyid_role3'>role3</span> <span class='op'>=</span> <span class='id identifier rubyid_role'>role</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_role_tag_delimiter'>role_tag_delimiter</span><span class='comma'>,</span> <span class='int'>3</span><span class='rparen'>)</span>
612
- <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_role1'>role1</span><span class='comma'>,</span> <span class='id identifier rubyid_role2'>role2</span><span class='comma'>,</span> <span class='id identifier rubyid_role3'>role3</span><span class='rparen'>)</span>
442
+ <span class='id identifier rubyid_role_parts'>role_parts</span> <span class='op'>=</span> <span class='id identifier rubyid_role'>role</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_role_tag_delimiter'>role_tag_delimiter</span><span class='comma'>,</span> <span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_role_max_depth'>role_max_depth</span><span class='rparen'>)</span>
443
+ <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_role_parts'>role_parts</span><span class='rparen'>)</span>
613
444
  <span class='kw'>end</span></pre>
614
445
  </td>
615
446
  </tr>
@@ -636,8 +467,8 @@
636
467
 
637
468
  <p>Equality</p>
638
469
 
639
- <pre class="code ruby"><code class="ruby"><span class='const'>Role</span><span class='op'>::</span><span class='const'>Data</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='op'>==</span> <span class='const'>Role</span><span class='op'>::</span><span class='const'>Data</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'>#=&gt; true
640
- </span><span class='const'>Role</span><span class='op'>::</span><span class='const'>Data</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkin</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>admin:jenkins</span><span class='tstring_end'>&quot;</span></span> <span class='comment'>#=&gt; true
470
+ <pre class="code ruby"><code class="ruby"><span class='const'>RoleData</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='op'>==</span> <span class='const'>RoleData</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'>#=&gt; true
471
+ </span><span class='const'>RoleData</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkin</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>admin:jenkins</span><span class='tstring_end'>&quot;</span></span> <span class='comment'>#=&gt; true
641
472
  </span></code></pre>
642
473
 
643
474
 
@@ -667,19 +498,19 @@
667
498
  <pre class="lines">
668
499
 
669
500
 
670
- 48
671
- 49
672
- 50
673
- 51
674
- 52
675
- 53
676
- 54
677
- 55
678
- 56
679
- 57</pre>
501
+ 69
502
+ 70
503
+ 71
504
+ 72
505
+ 73
506
+ 74
507
+ 75
508
+ 76
509
+ 77
510
+ 78</pre>
680
511
  </td>
681
512
  <td>
682
- <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 48</span>
513
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 69</span>
683
514
 
684
515
  <span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
685
516
  <span class='kw'>case</span> <span class='id identifier rubyid_other'>other</span>
@@ -711,12 +542,12 @@
711
542
  <pre class="lines">
712
543
 
713
544
 
714
- 59
715
- 60
716
- 61</pre>
545
+ 80
546
+ 81
547
+ 82</pre>
717
548
  </td>
718
549
  <td>
719
- <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 59</span>
550
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 80</span>
720
551
 
721
552
  <span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
722
553
  <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_to_s'>to_s</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot;</span><span class='tstring_end'>&quot;</span></span>
@@ -729,7 +560,7 @@
729
560
  <div class="method_details ">
730
561
  <h3 class="signature " id="match?-instance_method">
731
562
 
732
- - (<tt>Boolean</tt>) <strong>match?</strong>(role1, role2 = nil, role3 = nil)
563
+ - (<tt>Boolean</tt>) <strong>match?</strong>(*role_parts)
733
564
 
734
565
 
735
566
 
@@ -738,11 +569,41 @@
738
569
  </h3><div class="docstring">
739
570
  <div class="discussion">
740
571
 
572
+ <p>Check whether given role parts matches with this role data object</p>
573
+
574
+ <pre class="code ruby"><code class="ruby"><span class='const'>RoleData</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>slave</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>admin</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'>#=&gt; true
575
+ </span><span class='const'>RoleData</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>slave</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'>#=&gt; true
576
+ </span><span class='const'>RoleData</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>slave</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>slave</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'>#=&gt; true
577
+ </span><span class='const'>RoleData</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>slave</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>master</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'>#=&gt; false
578
+ </span><span class='const'>RoleData</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>slave</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'>#=&gt; true
579
+ </span><span class='const'>RoleData</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'>admin</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jenkins</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>slave</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>slave</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'>#=&gt; true
580
+ </span></code></pre>
581
+
741
582
 
742
583
  </div>
743
584
  </div>
744
585
  <div class="tags">
586
+ <p class="tag_title">Parameters:</p>
587
+ <ul class="param">
745
588
 
589
+ <li>
590
+
591
+ <span class='name'>role_parts</span>
592
+
593
+
594
+ <span class='type'>(<tt>Array</tt>)</span>
595
+
596
+
597
+
598
+ &mdash;
599
+ <div class='inline'>
600
+ <p>such as [“admin”, “jenkins”, “slave”]</p>
601
+ </div>
602
+
603
+ </li>
604
+
605
+ </ul>
606
+
746
607
  <p class="tag_title">Returns:</p>
747
608
  <ul class="return">
748
609
 
@@ -763,27 +624,17 @@
763
624
  <pre class="lines">
764
625
 
765
626
 
766
- 32
767
- 33
768
- 34
769
- 35
770
- 36
771
- 37
772
- 38
773
- 39
774
- 40</pre>
627
+ 58
628
+ 59
629
+ 60
630
+ 61</pre>
775
631
  </td>
776
632
  <td>
777
- <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 32</span>
633
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 58</span>
778
634
 
779
- <span class='kw'>def</span> <span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='id identifier rubyid_role1'>role1</span><span class='comma'>,</span> <span class='id identifier rubyid_role2'>role2</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_role3'>role3</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
780
- <span class='kw'>if</span> <span class='id identifier rubyid_role3'>role3</span>
781
- <span class='id identifier rubyid_role1'>role1</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_role1'>role1</span> <span class='kw'>and</span> <span class='id identifier rubyid_role2'>role2</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_role2'>role2</span> <span class='kw'>and</span> <span class='id identifier rubyid_role3'>role3</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_role3'>role3</span>
782
- <span class='kw'>elsif</span> <span class='id identifier rubyid_role2'>role2</span>
783
- <span class='id identifier rubyid_role1'>role1</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_role1'>role1</span> <span class='kw'>and</span> <span class='id identifier rubyid_role2'>role2</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_role2'>role2</span>
784
- <span class='kw'>else</span>
785
- <span class='id identifier rubyid_role1'>role1</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_role1'>role1</span>
786
- <span class='kw'>end</span>
635
+ <span class='kw'>def</span> <span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_role_parts'>role_parts</span><span class='rparen'>)</span>
636
+ <span class='id identifier rubyid_indexes'>indexes</span> <span class='op'>=</span> <span class='id identifier rubyid_role_parts'>role_parts</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='period'>.</span><span class='id identifier rubyid_with_index'>with_index</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_part'>part</span><span class='comma'>,</span> <span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_part'>part</span> <span class='op'>?</span> <span class='id identifier rubyid_i'>i</span> <span class='op'>:</span> <span class='kw'>nil</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span>
637
+ <span class='ivar'>@role_parts</span><span class='period'>.</span><span class='id identifier rubyid_values_at'>values_at</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_indexes'>indexes</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='id identifier rubyid_role_parts'>role_parts</span><span class='period'>.</span><span class='id identifier rubyid_values_at'>values_at</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_indexes'>indexes</span><span class='rparen'>)</span>
787
638
  <span class='kw'>end</span></pre>
788
639
  </td>
789
640
  </tr>
@@ -838,15 +689,15 @@
838
689
  <pre class="lines">
839
690
 
840
691
 
841
- 19
842
- 20
843
- 21</pre>
692
+ 25
693
+ 26
694
+ 27</pre>
844
695
  </td>
845
696
  <td>
846
- <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 19</span>
697
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 25</span>
847
698
 
848
699
  <span class='kw'>def</span> <span class='id identifier rubyid_role'>role</span>
849
- <span class='ivar'>@role</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_role1'>role1</span><span class='comma'>,</span> <span class='id identifier rubyid_role2'>role2</span><span class='comma'>,</span> <span class='id identifier rubyid_role3'>role3</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_reject'>reject</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:empty?</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_role_tag_delimiter'>role_tag_delimiter</span><span class='rparen'>)</span>
700
+ <span class='ivar'>@role</span> <span class='op'>||=</span> <span class='ivar'>@role_parts</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:empty?</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_role_tag_delimiter'>role_tag_delimiter</span><span class='rparen'>)</span>
850
701
  <span class='kw'>end</span></pre>
851
702
  </td>
852
703
  </tr>
@@ -897,21 +748,29 @@
897
748
  <pre class="lines">
898
749
 
899
750
 
900
- 25
901
- 26
902
- 27
903
- 28
904
- 29
905
- 30</pre>
751
+ 37
752
+ 38
753
+ 39
754
+ 40
755
+ 41
756
+ 42
757
+ 43
758
+ 44
759
+ 45
760
+ 46</pre>
906
761
  </td>
907
762
  <td>
908
- <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 25</span>
763
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/role_data.rb', line 37</span>
909
764
 
910
765
  <span class='kw'>def</span> <span class='id identifier rubyid_uppers'>uppers</span>
911
- <span class='id identifier rubyid_uppers'>uppers</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='const'>RoleData</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_role1'>role1</span><span class='rparen'>)</span><span class='rbracket'>]</span>
912
- <span class='id identifier rubyid_uppers'>uppers</span> <span class='op'>&lt;&lt;</span> <span class='const'>RoleData</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_role1'>role1</span><span class='comma'>,</span> <span class='id identifier rubyid_role2'>role2</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_role2'>role2</span> <span class='kw'>and</span> <span class='op'>!</span><span class='id identifier rubyid_role2'>role2</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
913
- <span class='id identifier rubyid_uppers'>uppers</span> <span class='op'>&lt;&lt;</span> <span class='const'>RoleData</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_role1'>role1</span><span class='comma'>,</span> <span class='id identifier rubyid_role2'>role2</span><span class='comma'>,</span> <span class='id identifier rubyid_role3'>role3</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_role3'>role3</span> <span class='kw'>and</span> <span class='op'>!</span><span class='id identifier rubyid_role3'>role3</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
914
- <span class='id identifier rubyid_uppers'>uppers</span>
766
+ <span class='id identifier rubyid_role_parts'>role_parts</span> <span class='op'>=</span> <span class='ivar'>@role_parts</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
767
+ <span class='id identifier rubyid_upper_role_parts'>upper_role_parts</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
768
+ <span class='id identifier rubyid_upper_role_parts'>upper_role_parts</span> <span class='op'>&lt;&lt;</span> <span class='lbracket'>[</span><span class='id identifier rubyid_role_parts'>role_parts</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span><span class='rbracket'>]</span>
769
+ <span class='id identifier rubyid_role_parts'>role_parts</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_role_part'>role_part</span><span class='op'>|</span>
770
+ <span class='kw'>break</span> <span class='kw'>if</span> <span class='id identifier rubyid_role_part'>role_part</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='id identifier rubyid_role_part'>role_part</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
771
+ <span class='id identifier rubyid_upper_role_parts'>upper_role_parts</span> <span class='op'>&lt;&lt;</span> <span class='lbracket'>[</span><span class='op'>*</span><span class='lparen'>(</span><span class='id identifier rubyid_upper_role_parts'>upper_role_parts</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_role_part'>role_part</span><span class='rbracket'>]</span>
772
+ <span class='kw'>end</span>
773
+ <span class='id identifier rubyid_upper_role_parts'>upper_role_parts</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_role_parts'>role_parts</span><span class='op'>|</span> <span class='const'>RoleData</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_role_parts'>role_parts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
915
774
  <span class='kw'>end</span></pre>
916
775
  </td>
917
776
  </tr>
@@ -923,7 +782,7 @@
923
782
  </div>
924
783
 
925
784
  <div id="footer">
926
- Generated on Thu Nov 24 10:25:37 2016 by
785
+ Generated on Fri Dec 2 11:54:00 2016 by
927
786
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
928
787
  0.8.7.6 (ruby-2.3.2).
929
788
  </div>