ionian 0.1.0
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 +7 -0
- data/doc/Ionian/IO.html +489 -0
- data/doc/Ionian.html +99 -0
- data/doc/created.rid +3 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/fonts.css +167 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +86 -0
- data/doc/js/darkfish.js +140 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +102 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +574 -0
- data/doc/table_of_contents.html +90 -0
- data/lib/ionian/io.rb +110 -0
- data/lib/ionian.rb +1 -0
- data/license.txt +19 -0
- metadata +147 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b86e85b6f1eac510ccf6b43d701e0d1ff6fc8c90
|
4
|
+
data.tar.gz: 322d2d6bd87e89d79a357017bb561192b101d38d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a2b555e4a9d5ad52f3a8ad7720c570d0f2710e246bff41ab5a7fe49465a3b3bc00b508a3c2ee2b017cd8049cec1ef13f182c668a631eef5cbd0dd0d022f08831
|
7
|
+
data.tar.gz: 1e556b489c9513e82b364774756bdff1247cedb6266a82eaa3f3c3611460fc6c76fca675a5f5f6aa5e11d55a768e2234bd624f2c6f0ad252c2ce791c404d1579
|
data/doc/Ionian/IO.html
ADDED
@@ -0,0 +1,489 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module Ionian::IO - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link href="../fonts.css" rel="stylesheet">
|
10
|
+
<link href="../rdoc.css" rel="stylesheet">
|
11
|
+
|
12
|
+
<script type="text/javascript">
|
13
|
+
var rdoc_rel_prefix = "../";
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<script src="../js/jquery.js"></script>
|
17
|
+
<script src="../js/navigation.js"></script>
|
18
|
+
<script src="../js/search_index.js"></script>
|
19
|
+
<script src="../js/search.js"></script>
|
20
|
+
<script src="../js/searcher.js"></script>
|
21
|
+
<script src="../js/darkfish.js"></script>
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="module">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="banner" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<h3>
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</h3>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" aria-live="polite"
|
51
|
+
aria-relevant="all" class="initially-hidden"></ul>
|
52
|
+
</form>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
<!-- Method Quickref -->
|
65
|
+
<div id="method-list-section" class="nav-section">
|
66
|
+
<h3>Methods</h3>
|
67
|
+
|
68
|
+
<ul class="link-list" role="directory">
|
69
|
+
|
70
|
+
<li ><a href="#method-c-extended">::extended</a>
|
71
|
+
|
72
|
+
<li ><a href="#method-i-initialize_ionian">#initialize_ionian</a>
|
73
|
+
|
74
|
+
<li ><a href="#method-i-match">#match</a>
|
75
|
+
|
76
|
+
<li ><a href="#method-i-purge">#purge</a>
|
77
|
+
|
78
|
+
<li ><a href="#method-i-read_match">#read_match</a>
|
79
|
+
|
80
|
+
<li ><a href="#method-i-register_observer">#register_observer</a>
|
81
|
+
|
82
|
+
<li ><a href="#method-i-run_match">#run_match</a>
|
83
|
+
|
84
|
+
<li ><a href="#method-i-unregister_observer">#unregister_observer</a>
|
85
|
+
|
86
|
+
</ul>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
</nav>
|
91
|
+
|
92
|
+
<main role="main" aria-labelledby="module-Ionian::IO">
|
93
|
+
<h1 id="module-Ionian::IO" class="module">
|
94
|
+
module Ionian::IO
|
95
|
+
</h1>
|
96
|
+
|
97
|
+
<section class="description">
|
98
|
+
|
99
|
+
<p>A mixin for <a href="IO.html">IO</a> objects that allows regular expression
|
100
|
+
matching and convenient notification of data in the buffer.</p>
|
101
|
+
|
102
|
+
<p>This module was designed to be EXTENDED by instantiated objects that
|
103
|
+
implement the standard library <a href="IO.html">IO</a> class.
|
104
|
+
my_socket.extend <a href="IO.html">Ionian::IO</a></p>
|
105
|
+
|
106
|
+
</section>
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<section class="attribute-method-details" class="method-section">
|
120
|
+
<header>
|
121
|
+
<h3>Attributes</h3>
|
122
|
+
</header>
|
123
|
+
|
124
|
+
|
125
|
+
<div id="attribute-i-ionian_timeout" class="method-detail">
|
126
|
+
<div class="method-heading attribute-method-heading">
|
127
|
+
<span class="method-name">ionian_timeout</span><span
|
128
|
+
class="attribute-access-type">[RW]</span>
|
129
|
+
</div>
|
130
|
+
|
131
|
+
<div class="method-description">
|
132
|
+
|
133
|
+
<p>Number of seconds to attempt an <a href="IO.html">IO</a> operation before
|
134
|
+
timing out. See standard library IO::select.</p>
|
135
|
+
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
</section>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
144
|
+
<header>
|
145
|
+
<h3>Public Class Methods</h3>
|
146
|
+
</header>
|
147
|
+
|
148
|
+
|
149
|
+
<div id="method-c-extended" class="method-detail ">
|
150
|
+
|
151
|
+
<div class="method-heading">
|
152
|
+
<span class="method-name">extended</span><span
|
153
|
+
class="method-args">(obj)</span>
|
154
|
+
|
155
|
+
<span class="method-click-advice">click to toggle source</span>
|
156
|
+
|
157
|
+
</div>
|
158
|
+
|
159
|
+
|
160
|
+
<div class="method-description">
|
161
|
+
|
162
|
+
<p>Called automaticallly when the object is extended with extend.</p>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<div class="method-source-code" id="extended-source">
|
168
|
+
<pre><span class="ruby-comment"># File lib/ionian/io.rb, line 14</span>
|
169
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">extended</span>(<span class="ruby-identifier">obj</span>)
|
170
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">initialize_ionian</span>
|
171
|
+
<span class="ruby-keyword">end</span></pre>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
</div>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
</div>
|
180
|
+
|
181
|
+
|
182
|
+
</section>
|
183
|
+
|
184
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
185
|
+
<header>
|
186
|
+
<h3>Public Instance Methods</h3>
|
187
|
+
</header>
|
188
|
+
|
189
|
+
|
190
|
+
<div id="method-i-initialize_ionian" class="method-detail ">
|
191
|
+
|
192
|
+
<div class="method-heading">
|
193
|
+
<span class="method-name">initialize_ionian</span><span
|
194
|
+
class="method-args">()</span>
|
195
|
+
|
196
|
+
<span class="method-click-advice">click to toggle source</span>
|
197
|
+
|
198
|
+
</div>
|
199
|
+
|
200
|
+
|
201
|
+
<div class="method-description">
|
202
|
+
|
203
|
+
<p>Initialize the <a href="../Ionian.html">Ionian</a> instance variables. This
|
204
|
+
is called automatically if extend is called on an object.</p>
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<div class="method-source-code" id="initialize_ionian-source">
|
210
|
+
<pre><span class="ruby-comment"># File lib/ionian/io.rb, line 20</span>
|
211
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize_ionian</span>
|
212
|
+
<span class="ruby-ivar">@ionian_listeners</span> = []
|
213
|
+
<span class="ruby-ivar">@ionian_buf</span> = <span class="ruby-string">''</span>
|
214
|
+
<span class="ruby-ivar">@ionian_expression</span> = <span class="ruby-regexp">/(.*?)\n/</span>
|
215
|
+
<span class="ruby-ivar">@ionian_timeout</span> = <span class="ruby-value">1</span>
|
216
|
+
<span class="ruby-keyword">end</span></pre>
|
217
|
+
</div>
|
218
|
+
|
219
|
+
</div>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
</div>
|
225
|
+
|
226
|
+
|
227
|
+
<div id="method-i-match" class="method-detail ">
|
228
|
+
|
229
|
+
<div class="method-heading">
|
230
|
+
<span class="method-name">match</span><span
|
231
|
+
class="method-args">(expression)</span>
|
232
|
+
|
233
|
+
<span class="method-click-advice">click to toggle source</span>
|
234
|
+
|
235
|
+
</div>
|
236
|
+
|
237
|
+
|
238
|
+
<div class="method-description">
|
239
|
+
|
240
|
+
<p>Set the expression to match against the read buffer. Can be a regular
|
241
|
+
expression specifying capture groups, or a string specifying the separator
|
242
|
+
or line terminator sequence. It is possible to use named captures in a
|
243
|
+
regex, which allows for convienient accessors like <a
|
244
|
+
href=":parameter">match</a>.</p>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<div class="method-source-code" id="match-source">
|
250
|
+
<pre><span class="ruby-comment"># File lib/ionian/io.rb, line 33</span>
|
251
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">match</span>(<span class="ruby-identifier">expression</span>)
|
252
|
+
<span class="ruby-ivar">@ionian_expression</span> = <span class="ruby-identifier">expression</span>
|
253
|
+
<span class="ruby-ivar">@ionian_expression</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span> <span class="ruby-node">"(.*?)#{expression}"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">expression</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span>
|
254
|
+
<span class="ruby-keyword">end</span></pre>
|
255
|
+
</div>
|
256
|
+
|
257
|
+
</div>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
</div>
|
263
|
+
|
264
|
+
|
265
|
+
<div id="method-i-purge" class="method-detail ">
|
266
|
+
|
267
|
+
<div class="method-heading">
|
268
|
+
<span class="method-name">purge</span><span
|
269
|
+
class="method-args">()</span>
|
270
|
+
|
271
|
+
<span class="method-click-advice">click to toggle source</span>
|
272
|
+
|
273
|
+
</div>
|
274
|
+
|
275
|
+
|
276
|
+
<div class="method-description">
|
277
|
+
|
278
|
+
<p>Erase the data in Ionian's buffer.</p>
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
<div class="method-source-code" id="purge-source">
|
284
|
+
<pre><span class="ruby-comment"># File lib/ionian/io.rb, line 89</span>
|
285
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">purge</span>
|
286
|
+
<span class="ruby-ivar">@ionian_buf</span> = <span class="ruby-string">''</span>
|
287
|
+
<span class="ruby-keyword">end</span></pre>
|
288
|
+
</div>
|
289
|
+
|
290
|
+
</div>
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
</div>
|
296
|
+
|
297
|
+
|
298
|
+
<div id="method-i-read_match" class="method-detail ">
|
299
|
+
|
300
|
+
<div class="method-heading">
|
301
|
+
<span class="method-name">read_match</span><span
|
302
|
+
class="method-args">(**kvargs) { |$~| ... }</span>
|
303
|
+
|
304
|
+
<span class="method-click-advice">click to toggle source</span>
|
305
|
+
|
306
|
+
</div>
|
307
|
+
|
308
|
+
|
309
|
+
<div class="method-description">
|
310
|
+
|
311
|
+
<p>Read matched data from the buffer. This method SHOULD NOT be used if <a
|
312
|
+
href="IO.html#method-i-run_match">run_match</a> is used.</p>
|
313
|
+
|
314
|
+
<p>Passes matches to the block (do |match|). If there are multiple matches,
|
315
|
+
the block is called multiple times.</p>
|
316
|
+
|
317
|
+
<p>Returns an array of matches. Returns nil if no data was received within the
|
318
|
+
timeout period.</p>
|
319
|
+
|
320
|
+
<p>Junk data that could exist before a match in the buffer can be accessed
|
321
|
+
with match.pre_match.</p>
|
322
|
+
|
323
|
+
<p>Data at the end of the buffer that is not matched can be accessed in the
|
324
|
+
last match with match.post_match. This data remains in the buffer for the
|
325
|
+
next <a href="IO.html#method-i-read_match">#read_match</a> cycle. This is
|
326
|
+
helpful for protocols like RS232 that do not have packet boundries.</p>
|
327
|
+
|
328
|
+
<p>kvargs:</p>
|
329
|
+
|
330
|
+
<pre>Timeout: Timeout in seconds IO::select will block.</pre>
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
<div class="method-source-code" id="read_match-source">
|
336
|
+
<pre><span class="ruby-comment"># File lib/ionian/io.rb, line 57</span>
|
337
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">read_match</span>(<span class="ruby-operator">**</span><span class="ruby-identifier">kvargs</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
338
|
+
<span class="ruby-identifier">timeout</span> = <span class="ruby-identifier">kvargs</span>.<span class="ruby-identifier">fetch</span> <span class="ruby-value">:timeout</span>, <span class="ruby-ivar">@ionian_timeout</span>
|
339
|
+
|
340
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">IO</span>.<span class="ruby-identifier">select</span> [<span class="ruby-keyword">self</span>], <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">timeout</span>
|
341
|
+
<span class="ruby-ivar">@ionian_buf</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">read_partial</span> <span class="ruby-value">0xFFFF</span>
|
342
|
+
|
343
|
+
<span class="ruby-ivar">@matches</span> = []
|
344
|
+
|
345
|
+
<span class="ruby-keyword">while</span> <span class="ruby-ivar">@ionian_buf</span> <span class="ruby-operator">=~</span> <span class="ruby-ivar">@ionian_expression</span>
|
346
|
+
<span class="ruby-ivar">@matches</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">$~</span> <span class="ruby-comment"># Match data.</span>
|
347
|
+
<span class="ruby-keyword">yield</span> <span class="ruby-identifier">$~</span>
|
348
|
+
<span class="ruby-keyword">end</span>
|
349
|
+
|
350
|
+
<span class="ruby-ivar">@ionian_buf</span> = <span class="ruby-node">$'</span> <span class="ruby-comment"># Leave post match data in the buffer.</span>
|
351
|
+
<span class="ruby-ivar">@matches</span>
|
352
|
+
<span class="ruby-keyword">end</span></pre>
|
353
|
+
</div>
|
354
|
+
|
355
|
+
</div>
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
</div>
|
361
|
+
|
362
|
+
|
363
|
+
<div id="method-i-register_observer" class="method-detail ">
|
364
|
+
|
365
|
+
<div class="method-heading">
|
366
|
+
<span class="method-name">register_observer</span><span
|
367
|
+
class="method-args">(&block)</span>
|
368
|
+
|
369
|
+
<span class="method-click-advice">click to toggle source</span>
|
370
|
+
|
371
|
+
</div>
|
372
|
+
|
373
|
+
|
374
|
+
<div class="method-description">
|
375
|
+
|
376
|
+
<p>Register a block to be called when <a
|
377
|
+
href="IO.html#method-i-run_match">run_match</a> receives matched data.
|
378
|
+
Method callbacks can be registered with &object.method(:method).
|
379
|
+
Returns a reference to the given block. block =
|
380
|
+
ionian_socket.register_observer {…}</p>
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
<div class="method-source-code" id="register_observer-source">
|
386
|
+
<pre><span class="ruby-comment"># File lib/ionian/io.rb, line 97</span>
|
387
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register_observer</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
388
|
+
<span class="ruby-ivar">@ionian_listeners</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">block</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@ionian_listeners</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">block</span>
|
389
|
+
<span class="ruby-identifier">block</span>
|
390
|
+
<span class="ruby-keyword">end</span></pre>
|
391
|
+
</div>
|
392
|
+
|
393
|
+
</div>
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
</div>
|
399
|
+
|
400
|
+
|
401
|
+
<div id="method-i-run_match" class="method-detail ">
|
402
|
+
|
403
|
+
<div class="method-heading">
|
404
|
+
<span class="method-name">run_match</span><span
|
405
|
+
class="method-args">(**kvargs) { |matches| ... }</span>
|
406
|
+
|
407
|
+
<span class="method-click-advice">click to toggle source</span>
|
408
|
+
|
409
|
+
</div>
|
410
|
+
|
411
|
+
|
412
|
+
<div class="method-description">
|
413
|
+
|
414
|
+
<p>Start a thread that checks for data and notifies listeners. Passes kvargs
|
415
|
+
to <a href="IO.html#method-i-read_match">read_match</a>. This method SHOULD
|
416
|
+
NOT be used if <a href="IO.html#method-i-read_match">read_match</a> is
|
417
|
+
used.</p>
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
<div class="method-source-code" id="run_match-source">
|
423
|
+
<pre><span class="ruby-comment"># File lib/ionian/io.rb, line 77</span>
|
424
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">run_match</span>(<span class="ruby-operator">**</span><span class="ruby-identifier">kvargs</span>)
|
425
|
+
<span class="ruby-ivar">@match_listener</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">do</span>
|
426
|
+
<span class="ruby-keyword">while</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">closed?</span> <span class="ruby-keyword">do</span>
|
427
|
+
<span class="ruby-identifier">matches</span> = <span class="ruby-identifier">read_match</span> <span class="ruby-identifier">kvargs</span>
|
428
|
+
<span class="ruby-ivar">@ionian_listeners</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">listener</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span> <span class="ruby-identifier">matches</span>} <span class="ruby-keyword">if</span> <span class="ruby-identifier">matches</span>
|
429
|
+
<span class="ruby-keyword">end</span>
|
430
|
+
|
431
|
+
<span class="ruby-ivar">@match_listener</span> = <span class="ruby-keyword">nil</span>
|
432
|
+
<span class="ruby-keyword">end</span>
|
433
|
+
<span class="ruby-keyword">end</span></pre>
|
434
|
+
</div>
|
435
|
+
|
436
|
+
</div>
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
</div>
|
442
|
+
|
443
|
+
|
444
|
+
<div id="method-i-unregister_observer" class="method-detail ">
|
445
|
+
|
446
|
+
<div class="method-heading">
|
447
|
+
<span class="method-name">unregister_observer</span><span
|
448
|
+
class="method-args">(&block)</span>
|
449
|
+
|
450
|
+
<span class="method-click-advice">click to toggle source</span>
|
451
|
+
|
452
|
+
</div>
|
453
|
+
|
454
|
+
|
455
|
+
<div class="method-description">
|
456
|
+
|
457
|
+
<p>Unregister a block from being called when matched data is received.</p>
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
<div class="method-source-code" id="unregister_observer-source">
|
463
|
+
<pre><span class="ruby-comment"># File lib/ionian/io.rb, line 103</span>
|
464
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">unregister_observer</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
465
|
+
<span class="ruby-ivar">@ionian_listeners</span>.<span class="ruby-identifier">delete_if</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">block</span>}
|
466
|
+
<span class="ruby-identifier">block</span>
|
467
|
+
<span class="ruby-keyword">end</span></pre>
|
468
|
+
</div>
|
469
|
+
|
470
|
+
</div>
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
</div>
|
476
|
+
|
477
|
+
|
478
|
+
</section>
|
479
|
+
|
480
|
+
</section>
|
481
|
+
</main>
|
482
|
+
|
483
|
+
|
484
|
+
<footer id="validator-badges" role="contentinfo">
|
485
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
486
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.preview.1.
|
487
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
488
|
+
</footer>
|
489
|
+
|
data/doc/Ionian.html
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module Ionian - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link href="./fonts.css" rel="stylesheet">
|
10
|
+
<link href="./rdoc.css" rel="stylesheet">
|
11
|
+
|
12
|
+
<script type="text/javascript">
|
13
|
+
var rdoc_rel_prefix = "./";
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<script src="./js/jquery.js"></script>
|
17
|
+
<script src="./js/navigation.js"></script>
|
18
|
+
<script src="./js/search_index.js"></script>
|
19
|
+
<script src="./js/search.js"></script>
|
20
|
+
<script src="./js/searcher.js"></script>
|
21
|
+
<script src="./js/darkfish.js"></script>
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="module">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="banner" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="./index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<h3>
|
33
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
36
|
+
</h3>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" aria-live="polite"
|
51
|
+
aria-relevant="all" class="initially-hidden"></ul>
|
52
|
+
</form>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
</div>
|
66
|
+
</nav>
|
67
|
+
|
68
|
+
<main role="main" aria-labelledby="module-Ionian">
|
69
|
+
<h1 id="module-Ionian" class="module">
|
70
|
+
module Ionian
|
71
|
+
</h1>
|
72
|
+
|
73
|
+
<section class="description">
|
74
|
+
|
75
|
+
</section>
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
</section>
|
91
|
+
</main>
|
92
|
+
|
93
|
+
|
94
|
+
<footer id="validator-badges" role="contentinfo">
|
95
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
96
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.preview.1.
|
97
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
98
|
+
</footer>
|
99
|
+
|
data/doc/created.rid
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|