ionian 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/Ionian/Extension/IO.html +44 -48
- data/doc/Ionian/Extension/Socket.html +462 -170
- data/doc/Ionian/Extension.html +4 -4
- data/doc/Ionian/Server.html +4 -4
- data/doc/Ionian/Socket.html +321 -103
- data/doc/Ionian.html +4 -4
- data/doc/_index.html +5 -5
- data/doc/css/style.css +1 -0
- data/doc/file.README.html +4 -4
- data/doc/file.license.html +4 -4
- data/doc/frames.html +1 -1
- data/doc/index.html +4 -4
- data/doc/method_list.html +81 -39
- data/doc/top-level-namespace.html +4 -4
- data/lib/ionian/extension/io.rb +22 -24
- data/lib/ionian/extension/socket.rb +52 -14
- data/lib/ionian/socket.rb +27 -17
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bf864733d5bbfd958bf4d506a57f2b5823574f4
|
4
|
+
data.tar.gz: 38dd61bf25fe9ebf638cccbd3b8ec6da92f8812e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d894ba9d981ed524d43c4397ae1cb420520e1e051684b4f9d425a03f96dc400df9d8cc0fa8a66fb118371276eeee2be5d7afc6970912f453b8353f8711d87502
|
7
|
+
data.tar.gz: 8f706f1afad7e4e32ae664b00603a9875bb5f369581b8bb550a35aa6503c3c2c4b698d9b387cda7aa12a2af83480faaf4b87268c843fc5bdd69d7d596a99e38e
|
@@ -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.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!"
|
20
|
+
framesUrl = "../../frames.html#!Ionian/Extension/IO.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -513,7 +513,7 @@ standard library IO::select.</p>
|
|
513
513
|
<td>
|
514
514
|
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 15</span>
|
515
515
|
|
516
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_extended'>extended</span
|
516
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_extended'>extended</span> <span class='id identifier rubyid_obj'>obj</span>
|
517
517
|
<span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_initialize_ionian'>initialize_ionian</span>
|
518
518
|
<span class='kw'>end</span></pre>
|
519
519
|
</td>
|
@@ -606,7 +606,7 @@ href=":parameter">match</a>.</p>
|
|
606
606
|
<td>
|
607
607
|
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 49</span>
|
608
608
|
|
609
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_expression='>expression=</span
|
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>
|
611
611
|
<span class='ivar'>@ionian_expression</span> <span class='op'>=</span> <span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(.*?)</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_expression'>expression</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_exp'>exp</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>String</span>
|
612
612
|
<span class='kw'>end</span></pre>
|
@@ -751,24 +751,18 @@ automatically.</p>
|
|
751
751
|
<pre class="lines">
|
752
752
|
|
753
753
|
|
754
|
-
153
|
755
754
|
154
|
756
755
|
155
|
757
756
|
156
|
758
757
|
157
|
759
|
-
158
|
760
|
-
159
|
761
|
-
160</pre>
|
758
|
+
158</pre>
|
762
759
|
</td>
|
763
760
|
<td>
|
764
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
761
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 154</span>
|
765
762
|
|
766
763
|
<span class='kw'>def</span> <span class='id identifier rubyid_purge'>purge</span>
|
767
764
|
<span class='comment'># Erase IO buffer.
|
768
|
-
</span> <span class='
|
769
|
-
<span class='id identifier rubyid_readpartial'>readpartial</span><span class='lparen'>(</span><span class='int'>0xFFFF</span><span class='rparen'>)</span>
|
770
|
-
<span class='kw'>end</span>
|
771
|
-
|
765
|
+
</span> <span class='id identifier rubyid_read_all'>read_all</span>
|
772
766
|
<span class='ivar'>@ionian_buf</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
773
767
|
<span class='kw'>end</span></pre>
|
774
768
|
</td>
|
@@ -805,13 +799,17 @@ large length.</p>
|
|
805
799
|
|
806
800
|
56
|
807
801
|
57
|
808
|
-
58
|
802
|
+
58
|
803
|
+
59
|
804
|
+
60</pre>
|
809
805
|
</td>
|
810
806
|
<td>
|
811
807
|
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 56</span>
|
812
808
|
|
813
809
|
<span class='kw'>def</span> <span class='id identifier rubyid_read_all'>read_all</span>
|
814
|
-
<span class='id identifier
|
810
|
+
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
811
|
+
<span class='id identifier rubyid_data'>data</span> <span class='op'>+=</span> <span class='id identifier rubyid_readpartial'>readpartial</span> <span class='int'>0xFFFF</span> <span class='kw'>while</span> <span class='id identifier rubyid_has_data?'>has_data?</span>
|
812
|
+
<span class='id identifier rubyid_data'>data</span>
|
815
813
|
<span class='kw'>end</span></pre>
|
816
814
|
</td>
|
817
815
|
</tr>
|
@@ -870,8 +868,6 @@ build_methods: Build accessor methods from named capture groups.
|
|
870
868
|
<pre class="lines">
|
871
869
|
|
872
870
|
|
873
|
-
86
|
874
|
-
87
|
875
871
|
88
|
876
872
|
89
|
877
873
|
90
|
@@ -915,12 +911,13 @@ build_methods: Build accessor methods from named capture groups.
|
|
915
911
|
128
|
916
912
|
129
|
917
913
|
130
|
918
|
-
131
|
914
|
+
131
|
915
|
+
132</pre>
|
919
916
|
</td>
|
920
917
|
<td>
|
921
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
918
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 88</span>
|
922
919
|
|
923
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_read_match'>read_match</span
|
920
|
+
<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>
|
924
921
|
<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>
|
925
922
|
<span class='id identifier rubyid_notify'>notify</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'>:notify</span><span class='comma'>,</span> <span class='kw'>true</span>
|
926
923
|
<span class='id identifier rubyid_skip_select'>skip_select</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'>:skip_select</span><span class='comma'>,</span> <span class='ivar'>@ionian_skip_select</span>
|
@@ -934,10 +931,7 @@ build_methods: Build accessor methods from named capture groups.
|
|
934
931
|
<span class='kw'>end</span>
|
935
932
|
|
936
933
|
<span class='comment'># Read data from the IO buffer until it's empty.
|
937
|
-
</span> <span class='
|
938
|
-
<span class='ivar'>@ionian_buf</span> <span class='op'><<</span> <span class='id identifier rubyid_readpartial'>readpartial</span><span class='lparen'>(</span><span class='int'>0xFFFF</span><span class='rparen'>)</span>
|
939
|
-
<span class='kw'>break</span> <span class='kw'>unless</span> <span class='op'>::</span><span class='const'>IO</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</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='int'>0</span>
|
940
|
-
<span class='kw'>end</span>
|
934
|
+
</span> <span class='ivar'>@ionian_buf</span> <span class='op'><<</span> <span class='id identifier rubyid_read_all'>read_all</span>
|
941
935
|
|
942
936
|
<span class='ivar'>@matches</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
943
937
|
|
@@ -950,19 +944,21 @@ build_methods: Build accessor methods from named capture groups.
|
|
950
944
|
</span> <span class='kw'>if</span> <span class='id identifier rubyid_build_methods'>build_methods</span>
|
951
945
|
<span class='ivar'>@matches</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_match'>match</span><span class='op'>|</span>
|
952
946
|
<span class='id identifier rubyid_match'>match</span><span class='period'>.</span><span class='id identifier rubyid_names'>names</span><span class='period'>
|
953
|
-
</span><span class='id identifier rubyid_ .map'> .map</span> <span class='lbrace'>{</span
|
954
|
-
</span><span class='id identifier rubyid_ .each'> .each</span> <span class='lbrace'>{</span
|
955
|
-
|
956
|
-
|
947
|
+
</span><span class='id identifier rubyid_ .map'> .map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='op'>|</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='rbrace'>}</span><span class='period'>
|
948
|
+
</span><span class='id identifier rubyid_ .each'> .each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_symbol'>symbol</span><span class='op'>|</span>
|
949
|
+
<span class='id identifier rubyid_match'>match</span><span class='period'>.</span><span class='id identifier rubyid_singleton_class'>singleton_class</span><span class='period'>
|
950
|
+
</span><span class='id identifier rubyid_ .send'> .send</span><span class='lparen'>(</span><span class='symbol'>:define_method</span><span class='comma'>,</span> <span class='id identifier rubyid_symbol'>symbol</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_match'>match</span><span class='lbracket'>[</span><span class='id identifier rubyid_symbol'>symbol</span><span class='rbracket'>]</span> <span class='rbrace'>}</span> \
|
951
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_match'>match</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span> <span class='id identifier rubyid_symbol'>symbol</span>
|
957
952
|
<span class='rbrace'>}</span>
|
958
953
|
<span class='kw'>end</span>
|
959
954
|
<span class='kw'>end</span>
|
960
955
|
|
961
956
|
<span class='comment'># Pass each match to block.
|
962
|
-
</span> <span class='ivar'>@matches</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span
|
957
|
+
</span> <span class='ivar'>@matches</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_match'>match</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_match'>match</span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
963
958
|
|
964
959
|
<span class='comment'># Notify on_match listeners unless the #run_match thread is active.
|
965
|
-
</span> <span class='ivar'>@matches</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span
|
960
|
+
</span> <span class='ivar'>@matches</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_match'>match</span><span class='op'>|</span> <span class='id identifier rubyid_notify_listeners'>notify_listeners</span> <span class='id identifier rubyid_match'>match</span> <span class='rbrace'>}</span> \
|
961
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_notify'>notify</span> <span class='kw'>and</span> <span class='kw'>not</span> <span class='ivar'>@match_listener</span>
|
966
962
|
|
967
963
|
<span class='ivar'>@matches</span>
|
968
964
|
<span class='kw'>end</span></pre>
|
@@ -1003,15 +999,15 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
|
|
1003
999
|
<pre class="lines">
|
1004
1000
|
|
1005
1001
|
|
1002
|
+
164
|
1003
|
+
165
|
1006
1004
|
166
|
1007
|
-
167
|
1008
|
-
168
|
1009
|
-
169</pre>
|
1005
|
+
167</pre>
|
1010
1006
|
</td>
|
1011
1007
|
<td>
|
1012
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
1008
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 164</span>
|
1013
1009
|
|
1014
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_register_observer'>register_observer</span
|
1010
|
+
<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>
|
1015
1011
|
<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>
|
1016
1012
|
<span class='id identifier rubyid_block'>block</span>
|
1017
1013
|
<span class='kw'>end</span></pre>
|
@@ -1048,7 +1044,6 @@ socket|). Passes kwargs to #read_match. This method SHOULD NOT be used if
|
|
1048
1044
|
<pre class="lines">
|
1049
1045
|
|
1050
1046
|
|
1051
|
-
136
|
1052
1047
|
137
|
1053
1048
|
138
|
1054
1049
|
139
|
@@ -1061,17 +1056,18 @@ socket|). Passes kwargs to #read_match. This method SHOULD NOT be used if
|
|
1061
1056
|
146
|
1062
1057
|
147
|
1063
1058
|
148
|
1064
|
-
149
|
1059
|
+
149
|
1060
|
+
150</pre>
|
1065
1061
|
</td>
|
1066
1062
|
<td>
|
1067
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
1063
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 137</span>
|
1068
1064
|
|
1069
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_run_match'>run_match</span
|
1065
|
+
<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>
|
1070
1066
|
<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>
|
1071
1067
|
<span class='kw'>begin</span>
|
1072
1068
|
<span class='kw'>while</span> <span class='kw'>not</span> <span class='id identifier rubyid_closed?'>closed?</span> <span class='kw'>do</span>
|
1073
1069
|
<span class='id identifier rubyid_matches'>matches</span> <span class='op'>=</span> <span class='id identifier rubyid_read_match'>read_match</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
|
1074
|
-
<span class='id identifier rubyid_matches'>matches</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span
|
1070
|
+
<span class='id identifier rubyid_matches'>matches</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_match'>match</span><span class='op'>|</span> <span class='id identifier rubyid_notify_listeners'>notify_listeners</span> <span class='id identifier rubyid_match'>match</span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_matches'>matches</span>
|
1075
1071
|
<span class='kw'>end</span>
|
1076
1072
|
<span class='kw'>rescue</span> <span class='const'>EOFError</span>
|
1077
1073
|
<span class='kw'>rescue</span> <span class='const'>IOError</span>
|
@@ -1111,16 +1107,16 @@ socket|). Passes kwargs to #read_match. This method SHOULD NOT be used if
|
|
1111
1107
|
<pre class="lines">
|
1112
1108
|
|
1113
1109
|
|
1110
|
+
172
|
1111
|
+
173
|
1114
1112
|
174
|
1115
|
-
175
|
1116
|
-
176
|
1117
|
-
177</pre>
|
1113
|
+
175</pre>
|
1118
1114
|
</td>
|
1119
1115
|
<td>
|
1120
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line
|
1116
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/extension/io.rb', line 172</span>
|
1121
1117
|
|
1122
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_unregister_observer'>unregister_observer</span
|
1123
|
-
<span class='ivar'>@ionian_listeners</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='lbrace'>{</span
|
1118
|
+
<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>
|
1119
|
+
<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>
|
1124
1120
|
<span class='id identifier rubyid_block'>block</span>
|
1125
1121
|
<span class='kw'>end</span></pre>
|
1126
1122
|
</td>
|
@@ -1133,9 +1129,9 @@ socket|). Passes kwargs to #read_match. This method SHOULD NOT be used if
|
|
1133
1129
|
</div>
|
1134
1130
|
|
1135
1131
|
<div id="footer">
|
1136
|
-
Generated on
|
1132
|
+
Generated on Fri Apr 11 21:18:17 2014 by
|
1137
1133
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1138
|
-
0.8.7.
|
1134
|
+
0.8.7.4 (ruby-2.1.1).
|
1139
1135
|
</div>
|
1140
1136
|
|
1141
1137
|
</body>
|