isimud 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/.yardoc/checksums +15 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +23 -0
- data/Gemfile.lock +123 -0
- data/README.md +218 -0
- data/Rakefile +2 -0
- data/config.ru +7 -0
- data/config/tddium.yml +11 -0
- data/doc/Isimud.html +1696 -0
- data/doc/Isimud/BunnyClient.html +1004 -0
- data/doc/Isimud/Client.html +812 -0
- data/doc/Isimud/Event.html +1500 -0
- data/doc/Isimud/EventListener.html +1217 -0
- data/doc/Isimud/EventObserver.html +367 -0
- data/doc/Isimud/EventObserver/ClassMethods.html +292 -0
- data/doc/Isimud/Generators.html +117 -0
- data/doc/Isimud/Generators/ConfigGenerator.html +192 -0
- data/doc/Isimud/Generators/InitializerGenerator.html +192 -0
- data/doc/Isimud/Logging.html +230 -0
- data/doc/Isimud/ModelWatcher.html +312 -0
- data/doc/Isimud/ModelWatcher/ClassMethods.html +511 -0
- data/doc/Isimud/Railtie.html +123 -0
- data/doc/Isimud/TestClient.html +1003 -0
- data/doc/Isimud/TestClient/Queue.html +556 -0
- data/doc/_index.html +290 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +338 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +338 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +711 -0
- data/doc/top-level-namespace.html +112 -0
- data/isimud.gemspec +25 -0
- data/lib/isimud.rb +91 -0
- data/lib/isimud/bunny_client.rb +95 -0
- data/lib/isimud/client.rb +48 -0
- data/lib/isimud/event.rb +112 -0
- data/lib/isimud/event_listener.rb +200 -0
- data/lib/isimud/event_observer.rb +81 -0
- data/lib/isimud/logging.rb +11 -0
- data/lib/isimud/model_watcher.rb +144 -0
- data/lib/isimud/railtie.rb +9 -0
- data/lib/isimud/tasks.rb +20 -0
- data/lib/isimud/test_client.rb +89 -0
- data/lib/isimud/version.rb +3 -0
- data/lib/rails/generators/isimud/config_generator.rb +12 -0
- data/lib/rails/generators/isimud/initializer_generator.rb +12 -0
- data/lib/rails/generators/isimud/templates/initializer.rb +17 -0
- data/lib/rails/generators/isimud/templates/isimud.yml +20 -0
- data/spec/internal/app/models/admin.rb +2 -0
- data/spec/internal/app/models/company.rb +34 -0
- data/spec/internal/app/models/user.rb +27 -0
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/routes.rb +3 -0
- data/spec/internal/db/schema.rb +22 -0
- data/spec/internal/log/.gitignore +1 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/isimud/bunny_client_spec.rb +125 -0
- data/spec/isimud/event_listener_spec.rb +86 -0
- data/spec/isimud/event_observer_spec.rb +32 -0
- data/spec/isimud/event_spec.rb +74 -0
- data/spec/isimud/model_watcher_spec.rb +189 -0
- data/spec/isimud/test_client_spec.rb +28 -0
- data/spec/isimud_spec.rb +49 -0
- data/spec/spec_helper.rb +55 -0
- metadata +195 -0
@@ -0,0 +1,556 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Isimud::TestClient::Queue
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!Isimud/TestClient/Queue.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (Q)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Isimud.html" title="Isimud (module)">Isimud</a></span></span> » <span class='title'><span class='object_link'><a href="../TestClient.html" title="Isimud::TestClient (class)">TestClient</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Queue</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Isimud::TestClient::Queue
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Isimud::TestClient::Queue</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/isimud/test_client.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
107
|
+
<ul class="summary">
|
108
|
+
|
109
|
+
<li class="public ">
|
110
|
+
<span class="summary_signature">
|
111
|
+
|
112
|
+
<a href="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</strong> </a>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
</span>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<span class="note title readonly">readonly</span>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<span class="summary_desc"><div class='inline'>
|
132
|
+
<p>Returns the value of attribute name.</p>
|
133
|
+
</div></span>
|
134
|
+
|
135
|
+
</li>
|
136
|
+
|
137
|
+
|
138
|
+
<li class="public ">
|
139
|
+
<span class="summary_signature">
|
140
|
+
|
141
|
+
<a href="#routing_keys-instance_method" title="#routing_keys (instance method)">- (Object) <strong>routing_keys</strong> </a>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</span>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<span class="note title readonly">readonly</span>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<span class="summary_desc"><div class='inline'>
|
161
|
+
<p>Returns the value of attribute routing_keys.</p>
|
162
|
+
</div></span>
|
163
|
+
|
164
|
+
</li>
|
165
|
+
|
166
|
+
|
167
|
+
</ul>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<h2>
|
174
|
+
Instance Method Summary
|
175
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
176
|
+
</h2>
|
177
|
+
|
178
|
+
<ul class="summary">
|
179
|
+
|
180
|
+
<li class="public ">
|
181
|
+
<span class="summary_signature">
|
182
|
+
|
183
|
+
<a href="#bind-instance_method" title="#bind (instance method)">- (Object) <strong>bind</strong>(exchange, options = {}) </a>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
</span>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
198
|
+
|
199
|
+
</li>
|
200
|
+
|
201
|
+
|
202
|
+
<li class="public ">
|
203
|
+
<span class="summary_signature">
|
204
|
+
|
205
|
+
<a href="#has_matching_key%3F-instance_method" title="#has_matching_key? (instance method)">- (Boolean) <strong>has_matching_key?</strong>(route) </a>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
</span>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
220
|
+
|
221
|
+
</li>
|
222
|
+
|
223
|
+
|
224
|
+
<li class="public ">
|
225
|
+
<span class="summary_signature">
|
226
|
+
|
227
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Queue) <strong>initialize</strong>(name, listener) </a>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
</span>
|
232
|
+
|
233
|
+
|
234
|
+
<span class="note title constructor">constructor</span>
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<span class="summary_desc"><div class='inline'>
|
244
|
+
<p>A new instance of Queue.</p>
|
245
|
+
</div></span>
|
246
|
+
|
247
|
+
</li>
|
248
|
+
|
249
|
+
|
250
|
+
<li class="public ">
|
251
|
+
<span class="summary_signature">
|
252
|
+
|
253
|
+
<a href="#publish-instance_method" title="#publish (instance method)">- (Object) <strong>publish</strong>(data) </a>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</span>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
268
|
+
|
269
|
+
</li>
|
270
|
+
|
271
|
+
|
272
|
+
</ul>
|
273
|
+
|
274
|
+
|
275
|
+
<div id="constructor_details" class="method_details_list">
|
276
|
+
<h2>Constructor Details</h2>
|
277
|
+
|
278
|
+
<div class="method_details first">
|
279
|
+
<h3 class="signature first" id="initialize-instance_method">
|
280
|
+
|
281
|
+
- (<tt><span class='object_link'><a href="" title="Isimud::TestClient::Queue (class)">Queue</a></span></tt>) <strong>initialize</strong>(name, listener)
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
</h3><div class="docstring">
|
288
|
+
<div class="discussion">
|
289
|
+
|
290
|
+
<p>Returns a new instance of Queue</p>
|
291
|
+
|
292
|
+
|
293
|
+
</div>
|
294
|
+
</div>
|
295
|
+
<div class="tags">
|
296
|
+
|
297
|
+
|
298
|
+
</div><table class="source_code">
|
299
|
+
<tr>
|
300
|
+
<td>
|
301
|
+
<pre class="lines">
|
302
|
+
|
303
|
+
|
304
|
+
9
|
305
|
+
10
|
306
|
+
11
|
307
|
+
12
|
308
|
+
13</pre>
|
309
|
+
</td>
|
310
|
+
<td>
|
311
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 9</span>
|
312
|
+
|
313
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_listener'>listener</span><span class='rparen'>)</span>
|
314
|
+
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
|
315
|
+
<span class='ivar'>@listener</span> <span class='op'>=</span> <span class='id identifier rubyid_listener'>listener</span>
|
316
|
+
<span class='ivar'>@routing_keys</span> <span class='op'>=</span> <span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
317
|
+
<span class='kw'>end</span></pre>
|
318
|
+
</td>
|
319
|
+
</tr>
|
320
|
+
</table>
|
321
|
+
</div>
|
322
|
+
|
323
|
+
</div>
|
324
|
+
|
325
|
+
<div id="instance_attr_details" class="attr_details">
|
326
|
+
<h2>Instance Attribute Details</h2>
|
327
|
+
|
328
|
+
|
329
|
+
<span id=""></span>
|
330
|
+
<div class="method_details first">
|
331
|
+
<h3 class="signature first" id="name-instance_method">
|
332
|
+
|
333
|
+
- (<tt>Object</tt>) <strong>name</strong> <span class="extras">(readonly)</span>
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
</h3><div class="docstring">
|
340
|
+
<div class="discussion">
|
341
|
+
|
342
|
+
<p>Returns the value of attribute name</p>
|
343
|
+
|
344
|
+
|
345
|
+
</div>
|
346
|
+
</div>
|
347
|
+
<div class="tags">
|
348
|
+
|
349
|
+
|
350
|
+
</div><table class="source_code">
|
351
|
+
<tr>
|
352
|
+
<td>
|
353
|
+
<pre class="lines">
|
354
|
+
|
355
|
+
|
356
|
+
7
|
357
|
+
8
|
358
|
+
9</pre>
|
359
|
+
</td>
|
360
|
+
<td>
|
361
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 7</span>
|
362
|
+
|
363
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
364
|
+
<span class='ivar'>@name</span>
|
365
|
+
<span class='kw'>end</span></pre>
|
366
|
+
</td>
|
367
|
+
</tr>
|
368
|
+
</table>
|
369
|
+
</div>
|
370
|
+
|
371
|
+
|
372
|
+
<span id=""></span>
|
373
|
+
<div class="method_details ">
|
374
|
+
<h3 class="signature " id="routing_keys-instance_method">
|
375
|
+
|
376
|
+
- (<tt>Object</tt>) <strong>routing_keys</strong> <span class="extras">(readonly)</span>
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
</h3><div class="docstring">
|
383
|
+
<div class="discussion">
|
384
|
+
|
385
|
+
<p>Returns the value of attribute routing_keys</p>
|
386
|
+
|
387
|
+
|
388
|
+
</div>
|
389
|
+
</div>
|
390
|
+
<div class="tags">
|
391
|
+
|
392
|
+
|
393
|
+
</div><table class="source_code">
|
394
|
+
<tr>
|
395
|
+
<td>
|
396
|
+
<pre class="lines">
|
397
|
+
|
398
|
+
|
399
|
+
7
|
400
|
+
8
|
401
|
+
9</pre>
|
402
|
+
</td>
|
403
|
+
<td>
|
404
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 7</span>
|
405
|
+
|
406
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_routing_keys'>routing_keys</span>
|
407
|
+
<span class='ivar'>@routing_keys</span>
|
408
|
+
<span class='kw'>end</span></pre>
|
409
|
+
</td>
|
410
|
+
</tr>
|
411
|
+
</table>
|
412
|
+
</div>
|
413
|
+
|
414
|
+
</div>
|
415
|
+
|
416
|
+
|
417
|
+
<div id="instance_method_details" class="method_details_list">
|
418
|
+
<h2>Instance Method Details</h2>
|
419
|
+
|
420
|
+
|
421
|
+
<div class="method_details first">
|
422
|
+
<h3 class="signature first" id="bind-instance_method">
|
423
|
+
|
424
|
+
- (<tt>Object</tt>) <strong>bind</strong>(exchange, options = {})
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
</h3><table class="source_code">
|
431
|
+
<tr>
|
432
|
+
<td>
|
433
|
+
<pre class="lines">
|
434
|
+
|
435
|
+
|
436
|
+
15
|
437
|
+
16
|
438
|
+
17
|
439
|
+
18</pre>
|
440
|
+
</td>
|
441
|
+
<td>
|
442
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 15</span>
|
443
|
+
|
444
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_bind'>bind</span><span class='lparen'>(</span><span class='id identifier rubyid_exchange'>exchange</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
445
|
+
<span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:routing_key</span><span class='rbracket'>]</span>
|
446
|
+
<span class='ivar'>@routing_keys</span> <span class='op'><<</span> <span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\.</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\*</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>.*</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
447
|
+
<span class='kw'>end</span></pre>
|
448
|
+
</td>
|
449
|
+
</tr>
|
450
|
+
</table>
|
451
|
+
</div>
|
452
|
+
|
453
|
+
<div class="method_details ">
|
454
|
+
<h3 class="signature " id="has_matching_key?-instance_method">
|
455
|
+
|
456
|
+
- (<tt>Boolean</tt>) <strong>has_matching_key?</strong>(route)
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
</h3><div class="docstring">
|
463
|
+
<div class="discussion">
|
464
|
+
|
465
|
+
|
466
|
+
</div>
|
467
|
+
</div>
|
468
|
+
<div class="tags">
|
469
|
+
|
470
|
+
<p class="tag_title">Returns:</p>
|
471
|
+
<ul class="return">
|
472
|
+
|
473
|
+
<li>
|
474
|
+
|
475
|
+
|
476
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
</li>
|
481
|
+
|
482
|
+
</ul>
|
483
|
+
|
484
|
+
</div><table class="source_code">
|
485
|
+
<tr>
|
486
|
+
<td>
|
487
|
+
<pre class="lines">
|
488
|
+
|
489
|
+
|
490
|
+
20
|
491
|
+
21
|
492
|
+
22</pre>
|
493
|
+
</td>
|
494
|
+
<td>
|
495
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 20</span>
|
496
|
+
|
497
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_has_matching_key?'>has_matching_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_route'>route</span><span class='rparen'>)</span>
|
498
|
+
<span class='ivar'>@routing_keys</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='id identifier rubyid_route'>route</span> <span class='op'>=~</span> <span class='id identifier rubyid_k'>k</span> <span class='rbrace'>}</span>
|
499
|
+
<span class='kw'>end</span></pre>
|
500
|
+
</td>
|
501
|
+
</tr>
|
502
|
+
</table>
|
503
|
+
</div>
|
504
|
+
|
505
|
+
<div class="method_details ">
|
506
|
+
<h3 class="signature " id="publish-instance_method">
|
507
|
+
|
508
|
+
- (<tt>Object</tt>) <strong>publish</strong>(data)
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
</h3><table class="source_code">
|
515
|
+
<tr>
|
516
|
+
<td>
|
517
|
+
<pre class="lines">
|
518
|
+
|
519
|
+
|
520
|
+
24
|
521
|
+
25
|
522
|
+
26
|
523
|
+
27
|
524
|
+
28
|
525
|
+
29
|
526
|
+
30
|
527
|
+
31</pre>
|
528
|
+
</td>
|
529
|
+
<td>
|
530
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 24</span>
|
531
|
+
|
532
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_publish'>publish</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
533
|
+
<span class='kw'>begin</span>
|
534
|
+
<span class='ivar'>@listener</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
535
|
+
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
536
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>TestClient: error delivering message: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
537
|
+
<span class='ivar'>@listener</span><span class='period'>.</span><span class='id identifier rubyid_exception_handler'>exception_handler</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span><span class='symbol'>:call</span><span class='comma'>,</span> <span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span>
|
538
|
+
<span class='kw'>end</span>
|
539
|
+
<span class='kw'>end</span></pre>
|
540
|
+
</td>
|
541
|
+
</tr>
|
542
|
+
</table>
|
543
|
+
</div>
|
544
|
+
|
545
|
+
</div>
|
546
|
+
|
547
|
+
</div>
|
548
|
+
|
549
|
+
<div id="footer">
|
550
|
+
Generated on Fri Apr 3 09:28:09 2015 by
|
551
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
552
|
+
0.8.7.6 (ruby-2.2.1).
|
553
|
+
</div>
|
554
|
+
|
555
|
+
</body>
|
556
|
+
</html>
|