ionian 0.6.8 → 0.6.9
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.
- checksums.yaml +4 -4
- data/doc/Ionian/Extension/IO.html +253 -89
- data/doc/Ionian/Extension/Socket.html +9 -9
- data/doc/Ionian/Extension.html +3 -3
- data/doc/Ionian/Server.html +3 -3
- data/doc/Ionian/Socket.html +464 -149
- data/doc/Ionian.html +3 -3
- data/doc/_index.html +4 -4
- data/doc/class_list.html +5 -1
- data/doc/file.README.html +25 -24
- data/doc/file.license.html +4 -4
- data/doc/file_list.html +5 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +25 -24
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +5 -1
- data/doc/top-level-namespace.html +3 -3
- data/lib/ionian/extension/io.rb +44 -29
- data/lib/ionian/extension/socket.rb +6 -6
- data/lib/ionian/socket.rb +79 -27
- data/license.txt +1 -1
- metadata +32 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1740c16fc1de977ccfb32dc86a9bbdad020cc09a
|
4
|
+
data.tar.gz: 39c63d9683e284d1998b46ae1df44e76fa15e1a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf1dfa00d8412aa1c874e004b106c49ada0ca4f4785f125cd2624c7e65ac80fdf5fe3f8f7a781743bd8e1f712dd5b1e54ad70750c0dc9d7e68c61cfda6c44729
|
7
|
+
data.tar.gz: a4cbd18beba67fdb8d8bc7435a2b48233c0d85679e13f9cea3da9a419d95be2953c3a73e227b35d7661bbea19cfa93fc2f39e3cc5cada7a88b5cc7b72875e1b2
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Ionian::Extension::IO
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -197,7 +197,7 @@ implement the standard library IO class. my_socket.extend Ionian::IO</p>
|
|
197
197
|
|
198
198
|
|
199
199
|
<span class="summary_desc"><div class='inline'>
|
200
|
-
<p>Returns the regular expression used for #read_match
|
200
|
+
<p>Returns the regular expression used for <span class='object_link'><a href="#read_match-instance_method" title="Ionian::Extension::IO#read_match (method)">#read_match</a></span>.</p>
|
201
201
|
</div></span>
|
202
202
|
|
203
203
|
</li>
|
@@ -245,7 +245,7 @@ implement the standard library IO class. my_socket.extend Ionian::IO</p>
|
|
245
245
|
|
246
246
|
|
247
247
|
<span class="summary_desc"><div class='inline'>
|
248
|
-
<p>
|
248
|
+
<p>True if there is data in the receive buffer.</p>
|
249
249
|
</div></span>
|
250
250
|
|
251
251
|
</li>
|
@@ -326,7 +326,7 @@ implement the standard library IO class. my_socket.extend Ionian::IO</p>
|
|
326
326
|
<li class="public ">
|
327
327
|
<span class="summary_signature">
|
328
328
|
|
329
|
-
<a href="#read_match-instance_method" title="#read_match (instance method)">- (
|
329
|
+
<a href="#read_match-instance_method" title="#read_match (instance method)">- (Array<MatchData><sup>?</sup>) <strong>read_match</strong>(**kwargs) {|match| ... }</a>
|
330
330
|
|
331
331
|
|
332
332
|
|
@@ -367,7 +367,7 @@ implement the standard library IO class. my_socket.extend Ionian::IO</p>
|
|
367
367
|
|
368
368
|
|
369
369
|
<span class="summary_desc"><div class='inline'>
|
370
|
-
<p>Register a block to be called when #run_match receives matched data.</p>
|
370
|
+
<p>Register a block to be called when <span class='object_link'><a href="#run_match-instance_method" title="Ionian::Extension::IO#run_match (method)">#run_match</a></span> receives matched data.</p>
|
371
371
|
</div></span>
|
372
372
|
|
373
373
|
</li>
|
@@ -539,7 +539,7 @@ standard library IO::select.</p>
|
|
539
539
|
</h3><div class="docstring">
|
540
540
|
<div class="discussion">
|
541
541
|
|
542
|
-
<p>Returns the regular expression used for #read_match
|
542
|
+
<p>Returns the regular expression used for <span class='object_link'><a href="#read_match-instance_method" title="Ionian::Extension::IO#read_match (method)">#read_match</a></span>.</p>
|
543
543
|
|
544
544
|
|
545
545
|
</div>
|
@@ -553,12 +553,12 @@ standard library IO::select.</p>
|
|
553
553
|
<pre class="lines">
|
554
554
|
|
555
555
|
|
556
|
-
41
|
557
556
|
42
|
558
|
-
43
|
557
|
+
43
|
558
|
+
44</pre>
|
559
559
|
</td>
|
560
560
|
<td>
|
561
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
561
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 42</span>
|
562
562
|
|
563
563
|
<span class='kw'>def</span> <span class='id identifier rubyid_expression'>expression</span>
|
564
564
|
<span class='ivar'>@ionian_expression</span>
|
@@ -598,13 +598,13 @@ href=":parameter">match</a>.</p>
|
|
598
598
|
<pre class="lines">
|
599
599
|
|
600
600
|
|
601
|
-
51
|
602
601
|
52
|
603
602
|
53
|
604
|
-
54
|
603
|
+
54
|
604
|
+
55</pre>
|
605
605
|
</td>
|
606
606
|
<td>
|
607
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
607
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 52</span>
|
608
608
|
|
609
609
|
<span class='kw'>def</span> <span class='id identifier rubyid_expression='>expression=</span> <span class='id identifier rubyid_exp'>exp</span>
|
610
610
|
<span class='ivar'>@ionian_expression</span> <span class='op'>=</span> <span class='id identifier rubyid_exp'>exp</span>
|
@@ -627,16 +627,34 @@ href=":parameter">match</a>.</p>
|
|
627
627
|
</h3><div class="docstring">
|
628
628
|
<div class="discussion">
|
629
629
|
|
630
|
-
<p>Returns
|
631
|
-
|
632
|
-
<pre class="code ruby"><code class="ruby">Timeout: Number of seconds to wait for data until
|
633
|
-
giving up. Set to nil for blocking.</code></pre>
|
630
|
+
<p>Returns True if there is data in the receive buffer.</p>
|
634
631
|
|
635
632
|
|
636
633
|
</div>
|
637
634
|
</div>
|
638
635
|
<div class="tags">
|
636
|
+
<p class="tag_title">Parameters:</p>
|
637
|
+
<ul class="param">
|
639
638
|
|
639
|
+
<li>
|
640
|
+
|
641
|
+
<span class='name'>timeout</span>
|
642
|
+
|
643
|
+
|
644
|
+
<span class='type'>(<tt>Numeric</tt>)</span>
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
—
|
649
|
+
<div class='inline'>
|
650
|
+
<p>Number of seconds to wait for data until giving up. Set to nil for
|
651
|
+
blocking.</p>
|
652
|
+
</div>
|
653
|
+
|
654
|
+
</li>
|
655
|
+
|
656
|
+
</ul>
|
657
|
+
|
640
658
|
<p class="tag_title">Returns:</p>
|
641
659
|
<ul class="return">
|
642
660
|
|
@@ -647,6 +665,11 @@ href=":parameter">match</a>.</p>
|
|
647
665
|
|
648
666
|
|
649
667
|
|
668
|
+
—
|
669
|
+
<div class='inline'>
|
670
|
+
<p>True if there is data in the receive buffer.</p>
|
671
|
+
</div>
|
672
|
+
|
650
673
|
</li>
|
651
674
|
|
652
675
|
</ul>
|
@@ -657,12 +680,12 @@ href=":parameter">match</a>.</p>
|
|
657
680
|
<pre class="lines">
|
658
681
|
|
659
682
|
|
660
|
-
36
|
661
683
|
37
|
662
|
-
38
|
684
|
+
38
|
685
|
+
39</pre>
|
663
686
|
</td>
|
664
687
|
<td>
|
665
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
688
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 37</span>
|
666
689
|
|
667
690
|
<span class='kw'>def</span> <span class='id identifier rubyid_has_data?'>has_data?</span> <span class='label'>timeout:</span> <span class='int'>0</span>
|
668
691
|
<span class='op'>::</span><span class='const'>IO</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span>
|
@@ -751,14 +774,14 @@ automatically.</p>
|
|
751
774
|
<pre class="lines">
|
752
775
|
|
753
776
|
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
777
|
+
172
|
778
|
+
173
|
779
|
+
174
|
780
|
+
175
|
781
|
+
176</pre>
|
759
782
|
</td>
|
760
783
|
<td>
|
761
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
784
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 172</span>
|
762
785
|
|
763
786
|
<span class='kw'>def</span> <span class='id identifier rubyid_purge'>purge</span>
|
764
787
|
<span class='comment'># Erase IO buffer.
|
@@ -798,7 +821,6 @@ nonblocking, returns nil if no data available.</p>
|
|
798
821
|
<pre class="lines">
|
799
822
|
|
800
823
|
|
801
|
-
60
|
802
824
|
61
|
803
825
|
62
|
804
826
|
63
|
@@ -806,10 +828,11 @@ nonblocking, returns nil if no data available.</p>
|
|
806
828
|
65
|
807
829
|
66
|
808
830
|
67
|
809
|
-
68
|
831
|
+
68
|
832
|
+
69</pre>
|
810
833
|
</td>
|
811
834
|
<td>
|
812
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
835
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 61</span>
|
813
836
|
|
814
837
|
<span class='kw'>def</span> <span class='id identifier rubyid_read_all'>read_all</span> <span class='label'>nonblocking:</span> <span class='kw'>false</span>
|
815
838
|
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_nonblocking'>nonblocking</span> <span class='kw'>and</span> <span class='kw'>not</span> <span class='id identifier rubyid_has_data?'>has_data?</span>
|
@@ -828,7 +851,7 @@ nonblocking, returns nil if no data available.</p>
|
|
828
851
|
<div class="method_details ">
|
829
852
|
<h3 class="signature " id="read_match-instance_method">
|
830
853
|
|
831
|
-
- (<tt>
|
854
|
+
- (<tt>Array<MatchData></tt><sup>?</sup>) <strong>read_match</strong>(**kwargs) {|match| ... }
|
832
855
|
|
833
856
|
|
834
857
|
|
@@ -838,55 +861,175 @@ nonblocking, returns nil if no data available.</p>
|
|
838
861
|
<div class="discussion">
|
839
862
|
|
840
863
|
<p>Read matched data from the buffer. This method SHOULD NOT be used if
|
841
|
-
#run_match is used.</p>
|
842
|
-
|
843
|
-
<p>Passes matches to the block (do |match|). If there are multiple matches,
|
844
|
-
the block is called multiple times.</p>
|
845
|
-
|
846
|
-
<p>Returns an array of matches. Returns nil if no data was received within the
|
847
|
-
timeout period.</p>
|
864
|
+
<span class='object_link'><a href="#run_match-instance_method" title="Ionian::Extension::IO#run_match (method)">#run_match</a></span> is used.</p>
|
848
865
|
|
849
866
|
<p>Junk data that could exist before a match in the buffer can be accessed
|
850
867
|
with match.pre_match.</p>
|
851
868
|
|
852
869
|
<p>Data at the end of the buffer that is not matched can be accessed in the
|
853
870
|
last match with match.post_match. This data remains in the buffer for the
|
854
|
-
next #read_match cycle. This is helpful for protocols like RS232 that do
|
871
|
+
next <span class='object_link'><a href="#read_match-instance_method" title="Ionian::Extension::IO#read_match (method)">#read_match</a></span> cycle. This is helpful for protocols like RS232 that do
|
855
872
|
not have packet boundries.</p>
|
856
873
|
|
857
|
-
<p>kwargs:</p>
|
858
|
-
|
859
|
-
<pre class="code ruby"><code class="ruby">timeout: Timeout in seconds IO::select will block.
|
860
|
-
expression: Override the expression match for this single
|
861
|
-
method call.
|
862
|
-
notify: Set to false to skip notifying match listener procs.
|
863
|
-
skip_select: Skip over the IO::select statement. Use if you
|
864
|
-
are calling IO::select ahead of this method.
|
865
|
-
build_methods: Build accessor methods from named capture groups.
|
866
|
-
Enabled by default.</code></pre>
|
867
|
-
|
868
874
|
|
869
875
|
</div>
|
870
876
|
</div>
|
871
877
|
<div class="tags">
|
878
|
+
<p class="tag_title">Parameters:</p>
|
879
|
+
<ul class="param">
|
880
|
+
|
881
|
+
<li>
|
882
|
+
|
883
|
+
<span class='name'>kwargs</span>
|
884
|
+
|
885
|
+
|
886
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
887
|
+
|
888
|
+
|
889
|
+
|
890
|
+
—
|
891
|
+
<div class='inline'>
|
892
|
+
<p>a customizable set of options</p>
|
893
|
+
</div>
|
894
|
+
|
895
|
+
</li>
|
896
|
+
|
897
|
+
</ul>
|
898
|
+
|
899
|
+
|
900
|
+
|
901
|
+
|
902
|
+
<p class="tag_title">Options Hash (<tt>**kwargs</tt>):</p>
|
903
|
+
<ul class="option">
|
904
|
+
|
905
|
+
<li>
|
906
|
+
<span class="name">:timeout</span>
|
907
|
+
<span class="type">(<tt>Numeric</tt>)</span>
|
908
|
+
<span class="default">
|
909
|
+
|
910
|
+
— default:
|
911
|
+
<tt>nil</tt>
|
912
|
+
|
913
|
+
</span>
|
914
|
+
|
915
|
+
— <div class='inline'>
|
916
|
+
<p>Timeout in seconds IO::select will block. Blocks indefinitely by default.
|
917
|
+
Set to 0 for nonblocking.</p>
|
918
|
+
</div>
|
919
|
+
|
920
|
+
</li>
|
921
|
+
|
922
|
+
<li>
|
923
|
+
<span class="name">:expression</span>
|
924
|
+
<span class="type">(<tt>Regexp</tt>, <tt>String</tt>)</span>
|
925
|
+
<span class="default">
|
926
|
+
|
927
|
+
</span>
|
928
|
+
|
929
|
+
— <div class='inline'>
|
930
|
+
<p>Override the expression match for this single method call.</p>
|
931
|
+
</div>
|
932
|
+
|
933
|
+
</li>
|
934
|
+
|
935
|
+
<li>
|
936
|
+
<span class="name">:notify</span>
|
937
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
938
|
+
<span class="default">
|
939
|
+
|
940
|
+
— default:
|
941
|
+
<tt>true</tt>
|
942
|
+
|
943
|
+
</span>
|
944
|
+
|
945
|
+
— <div class='inline'>
|
946
|
+
<p>Set to false to skip notifying match listener procs.</p>
|
947
|
+
</div>
|
948
|
+
|
949
|
+
</li>
|
950
|
+
|
951
|
+
<li>
|
952
|
+
<span class="name">:skip_select</span>
|
953
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
954
|
+
<span class="default">
|
955
|
+
|
956
|
+
— default:
|
957
|
+
<tt>false</tt>
|
958
|
+
|
959
|
+
</span>
|
960
|
+
|
961
|
+
— <div class='inline'>
|
962
|
+
<p>Skip over the IO::select statement. Use if you are calling IO::select ahead
|
963
|
+
of this method.</p>
|
964
|
+
</div>
|
965
|
+
|
966
|
+
</li>
|
967
|
+
|
968
|
+
<li>
|
969
|
+
<span class="name">:build_methods</span>
|
970
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
971
|
+
<span class="default">
|
972
|
+
|
973
|
+
— default:
|
974
|
+
<tt>true</tt>
|
975
|
+
|
976
|
+
</span>
|
977
|
+
|
978
|
+
— <div class='inline'>
|
979
|
+
<p>Build accessor methods from named capture groups.</p>
|
980
|
+
</div>
|
981
|
+
|
982
|
+
</li>
|
983
|
+
|
984
|
+
</ul>
|
872
985
|
|
873
986
|
|
987
|
+
<p class="tag_title">Yield Parameters:</p>
|
988
|
+
<ul class="yieldparam">
|
989
|
+
|
990
|
+
<li>
|
991
|
+
|
992
|
+
<span class='name'>match</span>
|
993
|
+
|
994
|
+
|
995
|
+
<span class='type'>(<tt>MatchData</tt>)</span>
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
—
|
1000
|
+
<div class='inline'>
|
1001
|
+
<p>If there are multiple matches, the block is called multiple times.</p>
|
1002
|
+
</div>
|
1003
|
+
|
1004
|
+
</li>
|
1005
|
+
|
1006
|
+
</ul>
|
1007
|
+
<p class="tag_title">Returns:</p>
|
1008
|
+
<ul class="return">
|
1009
|
+
|
1010
|
+
<li>
|
1011
|
+
|
1012
|
+
|
1013
|
+
<span class='type'>(<tt>Array<MatchData></tt>, <tt>nil</tt>)</span>
|
1014
|
+
|
1015
|
+
|
1016
|
+
|
1017
|
+
—
|
1018
|
+
<div class='inline'>
|
1019
|
+
<p>Returns an array of matches. Returns nil if no data was received within the
|
1020
|
+
timeout period.</p>
|
1021
|
+
</div>
|
1022
|
+
|
1023
|
+
</li>
|
1024
|
+
|
1025
|
+
</ul>
|
1026
|
+
|
874
1027
|
</div><table class="source_code">
|
875
1028
|
<tr>
|
876
1029
|
<td>
|
877
1030
|
<pre class="lines">
|
878
1031
|
|
879
1032
|
|
880
|
-
96
|
881
|
-
97
|
882
|
-
98
|
883
|
-
99
|
884
|
-
100
|
885
|
-
101
|
886
|
-
102
|
887
|
-
103
|
888
|
-
104
|
889
|
-
105
|
890
1033
|
106
|
891
1034
|
107
|
892
1035
|
108
|
@@ -921,10 +1064,20 @@ build_methods: Build accessor methods from named capture groups.
|
|
921
1064
|
137
|
922
1065
|
138
|
923
1066
|
139
|
924
|
-
140
|
1067
|
+
140
|
1068
|
+
141
|
1069
|
+
142
|
1070
|
+
143
|
1071
|
+
144
|
1072
|
+
145
|
1073
|
+
146
|
1074
|
+
147
|
1075
|
+
148
|
1076
|
+
149
|
1077
|
+
150</pre>
|
925
1078
|
</td>
|
926
1079
|
<td>
|
927
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
1080
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 106</span>
|
928
1081
|
|
929
1082
|
<span class='kw'>def</span> <span class='id identifier rubyid_read_match'>read_match</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span>
|
930
1083
|
<span class='id identifier rubyid_timeout'>timeout</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:timeout</span><span class='comma'>,</span> <span class='ivar'>@ionian_timeout</span>
|
@@ -992,15 +1145,26 @@ build_methods: Build accessor methods from named capture groups.
|
|
992
1145
|
</h3><div class="docstring">
|
993
1146
|
<div class="discussion">
|
994
1147
|
|
995
|
-
<p>Register a block to be called when #run_match receives matched data.
|
996
|
-
callbacks can be registered with &object.method(:method).
|
997
|
-
reference to the given block
|
1148
|
+
<p>Register a block to be called when <span class='object_link'><a href="#run_match-instance_method" title="Ionian::Extension::IO#run_match (method)">#run_match</a></span> receives matched data.
|
1149
|
+
Method callbacks can be registered with &object.method(:method).
|
1150
|
+
Returns a reference to the given block.</p>
|
998
1151
|
|
999
1152
|
|
1000
1153
|
</div>
|
1001
1154
|
</div>
|
1002
1155
|
<div class="tags">
|
1003
1156
|
|
1157
|
+
<div class="examples">
|
1158
|
+
<p class="tag_title">Examples:</p>
|
1159
|
+
|
1160
|
+
|
1161
|
+
<pre class="example code"><code>registered_block = ionian_socket.register_observer { |match| ... }</code></pre>
|
1162
|
+
|
1163
|
+
|
1164
|
+
<pre class="example code"><code><span class='id identifier rubyid_registered_block'>registered_block</span> <span class='op'>=</span> <span class='id identifier rubyid_ionian_socket'>ionian_socket</span><span class='period'>.</span><span class='id identifier rubyid_register_observer'>register_observer</span> <span class='op'>&</span><span class='id identifier rubyid_my_object'>my_object</span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:foo</span><span class='rparen'>)</span></code></pre>
|
1165
|
+
|
1166
|
+
</div>
|
1167
|
+
|
1004
1168
|
|
1005
1169
|
</div><table class="source_code">
|
1006
1170
|
<tr>
|
@@ -1008,13 +1172,13 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
|
|
1008
1172
|
<pre class="lines">
|
1009
1173
|
|
1010
1174
|
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1175
|
+
187
|
1176
|
+
188
|
1177
|
+
189
|
1178
|
+
190</pre>
|
1015
1179
|
</td>
|
1016
1180
|
<td>
|
1017
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
1181
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 187</span>
|
1018
1182
|
|
1019
1183
|
<span class='kw'>def</span> <span class='id identifier rubyid_register_observer'>register_observer</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span>
|
1020
1184
|
<span class='ivar'>@ionian_listeners</span> <span class='op'><<</span> <span class='id identifier rubyid_block'>block</span> <span class='kw'>unless</span> <span class='ivar'>@ionian_listeners</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_block'>block</span>
|
@@ -1038,8 +1202,8 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
|
|
1038
1202
|
<div class="discussion">
|
1039
1203
|
|
1040
1204
|
<p>Start a thread that checks for data and notifies listeners (do |match,
|
1041
|
-
socket|). Passes kwargs to #read_match
|
1042
|
-
#read_match is used.</p>
|
1205
|
+
socket|). Passes kwargs to <span class='object_link'><a href="#read_match-instance_method" title="Ionian::Extension::IO#read_match (method)">#read_match</a></span>. This method SHOULD NOT be used if
|
1206
|
+
<span class='object_link'><a href="#read_match-instance_method" title="Ionian::Extension::IO#read_match (method)">#read_match</a></span> is used.</p>
|
1043
1207
|
|
1044
1208
|
|
1045
1209
|
</div>
|
@@ -1053,23 +1217,23 @@ socket|). Passes kwargs to #read_match. This method SHOULD NOT be used if
|
|
1053
1217
|
<pre class="lines">
|
1054
1218
|
|
1055
1219
|
|
1056
|
-
145
|
1057
|
-
146
|
1058
|
-
147
|
1059
|
-
148
|
1060
|
-
149
|
1061
|
-
150
|
1062
|
-
151
|
1063
|
-
152
|
1064
|
-
153
|
1065
|
-
154
|
1066
1220
|
155
|
1067
1221
|
156
|
1068
1222
|
157
|
1069
|
-
158
|
1223
|
+
158
|
1224
|
+
159
|
1225
|
+
160
|
1226
|
+
161
|
1227
|
+
162
|
1228
|
+
163
|
1229
|
+
164
|
1230
|
+
165
|
1231
|
+
166
|
1232
|
+
167
|
1233
|
+
168</pre>
|
1070
1234
|
</td>
|
1071
1235
|
<td>
|
1072
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
1236
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 155</span>
|
1073
1237
|
|
1074
1238
|
<span class='kw'>def</span> <span class='id identifier rubyid_run_match'>run_match</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
|
1075
1239
|
<span class='ivar'>@match_listener</span> <span class='op'>||=</span> <span class='const'>Thread</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
|
@@ -1116,13 +1280,13 @@ socket|). Passes kwargs to #read_match. This method SHOULD NOT be used if
|
|
1116
1280
|
<pre class="lines">
|
1117
1281
|
|
1118
1282
|
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1283
|
+
195
|
1284
|
+
196
|
1285
|
+
197
|
1286
|
+
198</pre>
|
1123
1287
|
</td>
|
1124
1288
|
<td>
|
1125
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
1289
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 195</span>
|
1126
1290
|
|
1127
1291
|
<span class='kw'>def</span> <span class='id identifier rubyid_unregister_observer'>unregister_observer</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span>
|
1128
1292
|
<span class='ivar'>@ionian_listeners</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span> <span class='id identifier rubyid_o'>o</span> <span class='op'>==</span> <span class='id identifier rubyid_block'>block</span> <span class='rbrace'>}</span>
|
@@ -1138,9 +1302,9 @@ socket|). Passes kwargs to #read_match. This method SHOULD NOT be used if
|
|
1138
1302
|
</div>
|
1139
1303
|
|
1140
1304
|
<div id="footer">
|
1141
|
-
Generated on
|
1305
|
+
Generated on Fri Oct 31 15:50:43 2014 by
|
1142
1306
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1143
|
-
0.8.7.
|
1307
|
+
0.8.7.6 (ruby-2.1.4).
|
1144
1308
|
</div>
|
1145
1309
|
|
1146
1310
|
</body>
|