notifyhub 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +4 -0
- data/doc/Notify.html +16 -16
- data/doc/NotifyHub/NotFound.html +1 -1
- data/doc/NotifyHub/Redefining.html +1 -1
- data/doc/NotifyHub.html +84 -1
- data/doc/NotifySet.html +82 -46
- data/doc/_index.html +1 -1
- data/doc/file.CHANGELOG.html +7 -2
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +27 -21
- data/doc/top-level-namespace.html +1 -1
- data/lib/notifyhub.rb +19 -1
- metadata +2 -2
data/CHANGELOG.rdoc
CHANGED
data/doc/Notify.html
CHANGED
@@ -261,13 +261,13 @@
|
|
261
261
|
<pre class="lines">
|
262
262
|
|
263
263
|
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
264
|
+
334
|
265
|
+
335
|
266
|
+
336
|
267
|
+
337</pre>
|
268
268
|
</td>
|
269
269
|
<td>
|
270
|
-
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line
|
270
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 334</span>
|
271
271
|
|
272
272
|
<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_action'>action</span> <span class='rparen'>)</span>
|
273
273
|
<span class='ivar'>@action</span> <span class='op'>=</span> <span class='id identifier rubyid_action'>action</span>
|
@@ -331,12 +331,12 @@
|
|
331
331
|
<pre class="lines">
|
332
332
|
|
333
333
|
|
334
|
-
|
335
|
-
|
336
|
-
|
334
|
+
328
|
335
|
+
329
|
336
|
+
330</pre>
|
337
337
|
</td>
|
338
338
|
<td>
|
339
|
-
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line
|
339
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 328</span>
|
340
340
|
|
341
341
|
<span class='kw'>def</span> <span class='id identifier rubyid_enable'>enable</span>
|
342
342
|
<span class='ivar'>@enable</span>
|
@@ -399,14 +399,14 @@
|
|
399
399
|
<pre class="lines">
|
400
400
|
|
401
401
|
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
402
|
+
343
|
403
|
+
344
|
404
|
+
345
|
405
|
+
346
|
406
|
+
347</pre>
|
407
407
|
</td>
|
408
408
|
<td>
|
409
|
-
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line
|
409
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 343</span>
|
410
410
|
|
411
411
|
<span class='kw'>def</span> <span class='id identifier rubyid_notify'>notify</span><span class='lparen'>(</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span> <span class='rparen'>)</span>
|
412
412
|
<span class='kw'>if</span> <span class='ivar'>@enable</span>
|
@@ -423,7 +423,7 @@
|
|
423
423
|
</div>
|
424
424
|
|
425
425
|
<div id="footer">
|
426
|
-
Generated on
|
426
|
+
Generated on Tue Jan 21 18:23:01 2014 by
|
427
427
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
428
428
|
0.8.6.1 (ruby-1.9.3).
|
429
429
|
</div>
|
data/doc/NotifyHub/NotFound.html
CHANGED
@@ -125,7 +125,7 @@
|
|
125
125
|
</div>
|
126
126
|
|
127
127
|
<div id="footer">
|
128
|
-
Generated on
|
128
|
+
Generated on Tue Jan 21 18:23:01 2014 by
|
129
129
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
130
130
|
0.8.6.1 (ruby-1.9.3).
|
131
131
|
</div>
|
@@ -125,7 +125,7 @@
|
|
125
125
|
</div>
|
126
126
|
|
127
127
|
<div id="footer">
|
128
|
-
Generated on
|
128
|
+
Generated on Tue Jan 21 18:23:01 2014 by
|
129
129
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
130
130
|
0.8.6.1 (ruby-1.9.3).
|
131
131
|
</div>
|
data/doc/NotifyHub.html
CHANGED
@@ -397,6 +397,30 @@ NotifySet, and Notify).</p>
|
|
397
397
|
<p>Enable/disable Notify set or all if not set.</p>
|
398
398
|
</div></span>
|
399
399
|
|
400
|
+
</li>
|
401
|
+
|
402
|
+
|
403
|
+
<li class="public ">
|
404
|
+
<span class="summary_signature">
|
405
|
+
|
406
|
+
<a href="#ids-instance_method" title="#ids (instance method)">- (Array<Symbol>) <strong>ids</strong> </a>
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
</span>
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
<span class="summary_desc"><div class='inline'>
|
421
|
+
<p>Get list of NotifySet IDs.</p>
|
422
|
+
</div></span>
|
423
|
+
|
400
424
|
</li>
|
401
425
|
|
402
426
|
|
@@ -1132,6 +1156,65 @@ at action registration.</p>
|
|
1132
1156
|
</td>
|
1133
1157
|
</tr>
|
1134
1158
|
</table>
|
1159
|
+
</div>
|
1160
|
+
|
1161
|
+
<div class="method_details ">
|
1162
|
+
<h3 class="signature " id="ids-instance_method">
|
1163
|
+
|
1164
|
+
- (<tt>Array<Symbol></tt>) <strong>ids</strong>
|
1165
|
+
|
1166
|
+
|
1167
|
+
|
1168
|
+
|
1169
|
+
|
1170
|
+
</h3><div class="docstring">
|
1171
|
+
<div class="discussion">
|
1172
|
+
|
1173
|
+
<p>Get list of NotifySet IDs.</p>
|
1174
|
+
|
1175
|
+
|
1176
|
+
</div>
|
1177
|
+
</div>
|
1178
|
+
<div class="tags">
|
1179
|
+
|
1180
|
+
<p class="tag_title">Returns:</p>
|
1181
|
+
<ul class="return">
|
1182
|
+
|
1183
|
+
<li>
|
1184
|
+
|
1185
|
+
|
1186
|
+
<span class='type'>(<tt>Array<Symbol></tt>)</span>
|
1187
|
+
|
1188
|
+
|
1189
|
+
|
1190
|
+
—
|
1191
|
+
<div class='inline'>
|
1192
|
+
<p>NotifySet IDs.</p>
|
1193
|
+
</div>
|
1194
|
+
|
1195
|
+
</li>
|
1196
|
+
|
1197
|
+
</ul>
|
1198
|
+
|
1199
|
+
</div><table class="source_code">
|
1200
|
+
<tr>
|
1201
|
+
<td>
|
1202
|
+
<pre class="lines">
|
1203
|
+
|
1204
|
+
|
1205
|
+
196
|
1206
|
+
197
|
1207
|
+
198</pre>
|
1208
|
+
</td>
|
1209
|
+
<td>
|
1210
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 196</span>
|
1211
|
+
|
1212
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ids'>ids</span>
|
1213
|
+
<span class='ivar'>@set</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span>
|
1214
|
+
<span class='kw'>end</span></pre>
|
1215
|
+
</td>
|
1216
|
+
</tr>
|
1217
|
+
</table>
|
1135
1218
|
</div>
|
1136
1219
|
|
1137
1220
|
<div class="method_details ">
|
@@ -1303,7 +1386,7 @@ at action registration.</p>
|
|
1303
1386
|
</div>
|
1304
1387
|
|
1305
1388
|
<div id="footer">
|
1306
|
-
Generated on
|
1389
|
+
Generated on Tue Jan 21 18:23:01 2014 by
|
1307
1390
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1308
1391
|
0.8.6.1 (ruby-1.9.3).
|
1309
1392
|
</div>
|
data/doc/NotifySet.html
CHANGED
@@ -260,7 +260,7 @@
|
|
260
260
|
<li class="public ">
|
261
261
|
<span class="summary_signature">
|
262
262
|
|
263
|
-
<a href="#notify-instance_method" title="#notify (instance method)">- (Object) <strong>notify</strong>(*args) </a>
|
263
|
+
<a href="#notify-instance_method" title="#notify (instance method)">- (Array<Object>) <strong>notify</strong>(*args) </a>
|
264
264
|
|
265
265
|
|
266
266
|
|
@@ -359,14 +359,14 @@
|
|
359
359
|
<pre class="lines">
|
360
360
|
|
361
361
|
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
362
|
+
246
|
363
|
+
247
|
364
|
+
248
|
365
|
+
249
|
366
|
+
250</pre>
|
367
367
|
</td>
|
368
368
|
<td>
|
369
|
-
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line
|
369
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 246</span>
|
370
370
|
|
371
371
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span> <span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
372
372
|
<span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_id'>id</span>
|
@@ -431,12 +431,12 @@
|
|
431
431
|
<pre class="lines">
|
432
432
|
|
433
433
|
|
434
|
-
|
435
|
-
|
436
|
-
|
434
|
+
240
|
435
|
+
241
|
436
|
+
242</pre>
|
437
437
|
</td>
|
438
438
|
<td>
|
439
|
-
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line
|
439
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 240</span>
|
440
440
|
|
441
441
|
<span class='kw'>def</span> <span class='id identifier rubyid_enable'>enable</span>
|
442
442
|
<span class='ivar'>@enable</span>
|
@@ -479,12 +479,12 @@
|
|
479
479
|
<pre class="lines">
|
480
480
|
|
481
481
|
|
482
|
-
|
483
|
-
|
484
|
-
|
482
|
+
316
|
483
|
+
317
|
484
|
+
318</pre>
|
485
485
|
</td>
|
486
486
|
<td>
|
487
|
-
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line
|
487
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 316</span>
|
488
488
|
|
489
489
|
<span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span> <span class='id identifier rubyid_idx'>idx</span> <span class='rparen'>)</span>
|
490
490
|
<span class='ivar'>@list</span><span class='lbracket'>[</span> <span class='id identifier rubyid_idx'>idx</span> <span class='rbracket'>]</span>
|
@@ -544,14 +544,14 @@
|
|
544
544
|
<pre class="lines">
|
545
545
|
|
546
546
|
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
547
|
+
264
|
548
|
+
265
|
549
|
+
266
|
550
|
+
267
|
551
|
+
268</pre>
|
552
552
|
</td>
|
553
553
|
<td>
|
554
|
-
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line
|
554
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 264</span>
|
555
555
|
|
556
556
|
<span class='kw'>def</span> <span class='id identifier rubyid_action'>action</span><span class='lparen'>(</span> <span class='op'>&</span><span class='id identifier rubyid_action'>action</span> <span class='rparen'>)</span>
|
557
557
|
<span class='id identifier rubyid_n'>n</span> <span class='op'>=</span> <span class='const'>Notify</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_action'>action</span> <span class='rparen'>)</span>
|
@@ -589,14 +589,14 @@
|
|
589
589
|
<pre class="lines">
|
590
590
|
|
591
591
|
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
592
|
+
308
|
593
|
+
309
|
594
|
+
310
|
595
|
+
311
|
596
|
+
312</pre>
|
597
597
|
</td>
|
598
598
|
<td>
|
599
|
-
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line
|
599
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 308</span>
|
600
600
|
|
601
601
|
<span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span>
|
602
602
|
<span class='ivar'>@list</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_n'>n</span><span class='op'>|</span>
|
@@ -611,7 +611,7 @@
|
|
611
611
|
<div class="method_details ">
|
612
612
|
<h3 class="signature " id="notify-instance_method">
|
613
613
|
|
614
|
-
- (<tt>Object
|
614
|
+
- (<tt>Array<Object></tt>) <strong>notify</strong>(*args)
|
615
615
|
|
616
616
|
|
617
617
|
|
@@ -647,6 +647,24 @@
|
|
647
647
|
|
648
648
|
</ul>
|
649
649
|
|
650
|
+
<p class="tag_title">Returns:</p>
|
651
|
+
<ul class="return">
|
652
|
+
|
653
|
+
<li>
|
654
|
+
|
655
|
+
|
656
|
+
<span class='type'>(<tt>Array<Object></tt>)</span>
|
657
|
+
|
658
|
+
|
659
|
+
|
660
|
+
—
|
661
|
+
<div class='inline'>
|
662
|
+
<p>Array or single callback return value.</p>
|
663
|
+
</div>
|
664
|
+
|
665
|
+
</li>
|
666
|
+
|
667
|
+
</ul>
|
650
668
|
|
651
669
|
</div><table class="source_code">
|
652
670
|
<tr>
|
@@ -654,23 +672,41 @@
|
|
654
672
|
<pre class="lines">
|
655
673
|
|
656
674
|
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
675
|
+
289
|
676
|
+
290
|
677
|
+
291
|
678
|
+
292
|
679
|
+
293
|
680
|
+
294
|
681
|
+
295
|
682
|
+
296
|
683
|
+
297
|
684
|
+
298
|
685
|
+
299
|
686
|
+
300
|
687
|
+
301
|
688
|
+
302
|
689
|
+
303
|
690
|
+
304</pre>
|
664
691
|
</td>
|
665
692
|
<td>
|
666
|
-
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line
|
693
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 289</span>
|
667
694
|
|
668
695
|
<span class='kw'>def</span> <span class='id identifier rubyid_notify'>notify</span><span class='lparen'>(</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span> <span class='rparen'>)</span>
|
696
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
669
697
|
<span class='kw'>if</span> <span class='ivar'>@enable</span>
|
670
698
|
<span class='ivar'>@list</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_n'>n</span><span class='op'>|</span>
|
671
|
-
<span class='id identifier rubyid_n'>n</span><span class='period'>.</span><span class='id identifier rubyid_notify'>notify</span><span class='lparen'>(</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span> <span class='rparen'>)</span>
|
699
|
+
<span class='id identifier rubyid_ret'>ret</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='id identifier rubyid_n'>n</span><span class='period'>.</span><span class='id identifier rubyid_notify'>notify</span><span class='lparen'>(</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span> <span class='rparen'>)</span>
|
672
700
|
<span class='kw'>end</span>
|
673
701
|
<span class='kw'>end</span>
|
702
|
+
|
703
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_ret'>ret</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>1</span>
|
704
|
+
<span class='comment'># Return single value.
|
705
|
+
</span> <span class='id identifier rubyid_ret'>ret</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
706
|
+
<span class='kw'>else</span>
|
707
|
+
<span class='comment'># Return array of results.
|
708
|
+
</span> <span class='id identifier rubyid_ret'>ret</span>
|
709
|
+
<span class='kw'>end</span>
|
674
710
|
<span class='kw'>end</span></pre>
|
675
711
|
</td>
|
676
712
|
</tr>
|
@@ -725,16 +761,16 @@
|
|
725
761
|
<pre class="lines">
|
726
762
|
|
727
763
|
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
764
|
+
277
|
765
|
+
278
|
766
|
+
279
|
767
|
+
280
|
768
|
+
281
|
769
|
+
282
|
770
|
+
283</pre>
|
735
771
|
</td>
|
736
772
|
<td>
|
737
|
-
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line
|
773
|
+
<pre class="code"><span class="info file"># File 'lib/notifyhub.rb', line 277</span>
|
738
774
|
|
739
775
|
<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span> <span class='id identifier rubyid_notify'>notify</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
740
776
|
<span class='kw'>if</span> <span class='id identifier rubyid_notify'>notify</span>
|
@@ -753,7 +789,7 @@
|
|
753
789
|
</div>
|
754
790
|
|
755
791
|
<div id="footer">
|
756
|
-
Generated on
|
792
|
+
Generated on Tue Jan 21 18:23:01 2014 by
|
757
793
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
758
794
|
0.8.6.1 (ruby-1.9.3).
|
759
795
|
</div>
|
data/doc/_index.html
CHANGED
@@ -136,7 +136,7 @@
|
|
136
136
|
</div>
|
137
137
|
|
138
138
|
<div id="footer">
|
139
|
-
Generated on
|
139
|
+
Generated on Tue Jan 21 18:23:01 2014 by
|
140
140
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
141
141
|
0.8.6.1 (ruby-1.9.3).
|
142
142
|
</div>
|
data/doc/file.CHANGELOG.html
CHANGED
@@ -63,14 +63,19 @@
|
|
63
63
|
|
64
64
|
<div id="content"><div id='filecontents'>
|
65
65
|
<h1>Version history</h1>
|
66
|
-
<dl class="rdoc-list"><dt>0.0.
|
66
|
+
<dl class="rdoc-list"><dt>0.0.2</dt>
|
67
|
+
<dd>
|
68
|
+
<p>Added Notify#ids to get list of NotifySet. NotifySet#notify returns a
|
69
|
+
single value with one Notify and an array of return values if multiple
|
70
|
+
Notify.</p>
|
71
|
+
</dd><dt>0.0.1</dt>
|
67
72
|
<dd>
|
68
73
|
<p>Initial version.</p>
|
69
74
|
</dd></dl>
|
70
75
|
</div></div>
|
71
76
|
|
72
77
|
<div id="footer">
|
73
|
-
Generated on
|
78
|
+
Generated on Tue Jan 21 18:23:01 2014 by
|
74
79
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
75
80
|
0.8.6.1 (ruby-1.9.3).
|
76
81
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -84,7 +84,7 @@ NotifySet, and Notify).</p>
|
|
84
84
|
</div></div>
|
85
85
|
|
86
86
|
<div id="footer">
|
87
|
-
Generated on
|
87
|
+
Generated on Tue Jan 21 18:23:01 2014 by
|
88
88
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
89
89
|
0.8.6.1 (ruby-1.9.3).
|
90
90
|
</div>
|
data/doc/index.html
CHANGED
@@ -84,7 +84,7 @@ NotifySet, and Notify).</p>
|
|
84
84
|
</div></div>
|
85
85
|
|
86
86
|
<div id="footer">
|
87
|
-
Generated on
|
87
|
+
Generated on Tue Jan 21 18:23:01 2014 by
|
88
88
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
89
89
|
0.8.6.1 (ruby-1.9.3).
|
90
90
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -47,14 +47,14 @@
|
|
47
47
|
|
48
48
|
|
49
49
|
<li class="r1 ">
|
50
|
-
<span class='object_link'><a href="
|
51
|
-
<small>
|
50
|
+
<span class='object_link'><a href="NotifySet.html#%5B%5D-instance_method" title="NotifySet#[] (method)">#[]</a></span>
|
51
|
+
<small>NotifySet</small>
|
52
52
|
</li>
|
53
53
|
|
54
54
|
|
55
55
|
<li class="r2 ">
|
56
|
-
<span class='object_link'><a href="
|
57
|
-
<small>
|
56
|
+
<span class='object_link'><a href="NotifyHub.html#%5B%5D-instance_method" title="NotifyHub#[] (method)">#[]</a></span>
|
57
|
+
<small>NotifyHub</small>
|
58
58
|
</li>
|
59
59
|
|
60
60
|
|
@@ -89,13 +89,13 @@
|
|
89
89
|
|
90
90
|
|
91
91
|
<li class="r2 ">
|
92
|
-
<span class='object_link'><a href="NotifyHub.html#declare-
|
92
|
+
<span class='object_link'><a href="NotifyHub.html#declare-class_method" title="NotifyHub.declare (method)">declare</a></span>
|
93
93
|
<small>NotifyHub</small>
|
94
94
|
</li>
|
95
95
|
|
96
96
|
|
97
97
|
<li class="r1 ">
|
98
|
-
<span class='object_link'><a href="NotifyHub.html#declare-
|
98
|
+
<span class='object_link'><a href="NotifyHub.html#declare-instance_method" title="NotifyHub#declare (method)">#declare</a></span>
|
99
99
|
<small>NotifyHub</small>
|
100
100
|
</li>
|
101
101
|
|
@@ -107,8 +107,8 @@
|
|
107
107
|
|
108
108
|
|
109
109
|
<li class="r1 ">
|
110
|
-
<span class='object_link'><a href="
|
111
|
-
<small>
|
110
|
+
<span class='object_link'><a href="NotifyHub.html#enable-instance_method" title="NotifyHub#enable (method)">#enable</a></span>
|
111
|
+
<small>NotifyHub</small>
|
112
112
|
</li>
|
113
113
|
|
114
114
|
|
@@ -119,26 +119,38 @@
|
|
119
119
|
|
120
120
|
|
121
121
|
<li class="r1 ">
|
122
|
-
<span class='object_link'><a href="
|
123
|
-
<small>
|
122
|
+
<span class='object_link'><a href="NotifySet.html#enable-instance_method" title="NotifySet#enable (method)">#enable</a></span>
|
123
|
+
<small>NotifySet</small>
|
124
124
|
</li>
|
125
125
|
|
126
126
|
|
127
127
|
<li class="r2 ">
|
128
|
-
<span class='object_link'><a href="NotifyHub.html#
|
128
|
+
<span class='object_link'><a href="NotifyHub.html#ids-instance_method" title="NotifyHub#ids (method)">#ids</a></span>
|
129
129
|
<small>NotifyHub</small>
|
130
130
|
</li>
|
131
131
|
|
132
132
|
|
133
133
|
<li class="r1 ">
|
134
|
+
<span class='object_link'><a href="NotifySet.html#initialize-instance_method" title="NotifySet#initialize (method)">#initialize</a></span>
|
135
|
+
<small>NotifySet</small>
|
136
|
+
</li>
|
137
|
+
|
138
|
+
|
139
|
+
<li class="r2 ">
|
134
140
|
<span class='object_link'><a href="Notify.html#initialize-instance_method" title="Notify#initialize (method)">#initialize</a></span>
|
135
141
|
<small>Notify</small>
|
136
142
|
</li>
|
137
143
|
|
138
144
|
|
145
|
+
<li class="r1 ">
|
146
|
+
<span class='object_link'><a href="NotifyHub.html#initialize-instance_method" title="NotifyHub#initialize (method)">#initialize</a></span>
|
147
|
+
<small>NotifyHub</small>
|
148
|
+
</li>
|
149
|
+
|
150
|
+
|
139
151
|
<li class="r2 ">
|
140
|
-
<span class='object_link'><a href="
|
141
|
-
<small>
|
152
|
+
<span class='object_link'><a href="NotifyHub.html#notify-instance_method" title="NotifyHub#notify (method)">#notify</a></span>
|
153
|
+
<small>NotifyHub</small>
|
142
154
|
</li>
|
143
155
|
|
144
156
|
|
@@ -155,8 +167,8 @@
|
|
155
167
|
|
156
168
|
|
157
169
|
<li class="r1 ">
|
158
|
-
<span class='object_link'><a href="
|
159
|
-
<small>
|
170
|
+
<span class='object_link'><a href="NotifySet.html#remove-instance_method" title="NotifySet#remove (method)">#remove</a></span>
|
171
|
+
<small>NotifySet</small>
|
160
172
|
</li>
|
161
173
|
|
162
174
|
|
@@ -166,12 +178,6 @@
|
|
166
178
|
</li>
|
167
179
|
|
168
180
|
|
169
|
-
<li class="r1 ">
|
170
|
-
<span class='object_link'><a href="NotifySet.html#remove-instance_method" title="NotifySet#remove (method)">#remove</a></span>
|
171
|
-
<small>NotifySet</small>
|
172
|
-
</li>
|
173
|
-
|
174
|
-
|
175
181
|
</ul>
|
176
182
|
</div>
|
177
183
|
</body>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on
|
106
|
+
Generated on Tue Jan 21 18:23:01 2014 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
108
|
0.8.6.1 (ruby-1.9.3).
|
109
109
|
</div>
|
data/lib/notifyhub.rb
CHANGED
@@ -190,6 +190,14 @@ class NotifyHub
|
|
190
190
|
end
|
191
191
|
|
192
192
|
|
193
|
+
# Get list of NotifySet IDs.
|
194
|
+
#
|
195
|
+
# @return [Array<Symbol>] NotifySet IDs.
|
196
|
+
def ids
|
197
|
+
@set.keys
|
198
|
+
end
|
199
|
+
|
200
|
+
|
193
201
|
|
194
202
|
private
|
195
203
|
|
@@ -277,12 +285,22 @@ class NotifySet
|
|
277
285
|
# Run all notifiers in Notify set.
|
278
286
|
#
|
279
287
|
# @param args [Array<Object>] Arguments for notifiers.
|
288
|
+
# @return [Array<Object>] Array or single callback return value.
|
280
289
|
def notify( *args )
|
290
|
+
ret = []
|
281
291
|
if @enable
|
282
292
|
@list.each do |n|
|
283
|
-
n.notify( *args )
|
293
|
+
ret.push n.notify( *args )
|
284
294
|
end
|
285
295
|
end
|
296
|
+
|
297
|
+
if ret.length == 1
|
298
|
+
# Return single value.
|
299
|
+
ret[0]
|
300
|
+
else
|
301
|
+
# Return array of results.
|
302
|
+
ret
|
303
|
+
end
|
286
304
|
end
|
287
305
|
|
288
306
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifyhub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'NotifyHub is a callback facility. NotifyHub is used by the informer
|
15
15
|
|