bridge-ruby 0.2.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.
- data/LICENSE +19 -0
- data/README.md +31 -0
- data/Rakefile +24 -0
- data/bridge-ruby.gemspec +24 -0
- data/doc/Bridge.html +276 -0
- data/doc/Bridge/Bridge.html +1874 -0
- data/doc/Bridge/Bridge/SystemService.html +396 -0
- data/doc/Bridge/Client.html +271 -0
- data/doc/Bridge/Connection.html +1180 -0
- data/doc/Bridge/Connection/SockBuffer.html +322 -0
- data/doc/Bridge/Reference.html +605 -0
- data/doc/Bridge/Serializer.html +405 -0
- data/doc/Bridge/Serializer/Callback.html +498 -0
- data/doc/Bridge/Tcp.html +657 -0
- data/doc/Bridge/Util.html +643 -0
- data/doc/Bridge/Util/CallbackReference.html +557 -0
- data/doc/OpenSSL/X509/Certificate.html +275 -0
- data/doc/SSLCertificateVerification.html +446 -0
- data/doc/_index.html +239 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +328 -0
- data/doc/file.README.html +106 -0
- data/doc/file_list.html +55 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +106 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +772 -0
- data/doc/top-level-namespace.html +112 -0
- data/examples/channels/client-writeable.rb +24 -0
- data/examples/channels/client.rb +23 -0
- data/examples/channels/server.rb +24 -0
- data/examples/chat/chatclient.rb +21 -0
- data/examples/chat/chatserver.rb +24 -0
- data/examples/client-context/client.rb +21 -0
- data/examples/client-context/server.rb +25 -0
- data/examples/secure/example.rb +8 -0
- data/examples/simple/channels.rb +47 -0
- data/examples/simple/services.rb +41 -0
- data/include/ssl/cacert.pem +3331 -0
- data/lib/bridge-ruby.rb +441 -0
- data/lib/client.rb +14 -0
- data/lib/connection.rb +162 -0
- data/lib/reference.rb +49 -0
- data/lib/serializer.rb +104 -0
- data/lib/ssl_utils.rb +68 -0
- data/lib/tcp.rb +73 -0
- data/lib/util.rb +101 -0
- data/lib/version.rb +3 -0
- data/rakelib/package.rake +4 -0
- data/rakelib/test.rake +8 -0
- data/test/regression/reconnect.rb +48 -0
- data/test/regression/rpc.rb +39 -0
- data/test/regression/test.rb +58 -0
- data/test/unit/bridge_dummy.rb +26 -0
- data/test/unit/connection_dummy.rb +21 -0
- data/test/unit/reference_dummy.rb +11 -0
- data/test/unit/tcp_dummy.rb +12 -0
- data/test/unit/test.rb +20 -0
- data/test/unit/test_reference.rb +30 -0
- data/test/unit/test_serializer.rb +109 -0
- data/test/unit/test_tcp.rb +51 -0
- data/test/unit/test_util.rb +59 -0
- metadata +162 -0
@@ -0,0 +1,405 @@
|
|
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
|
+
Module: Bridge::Serializer
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" 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#!" + escape(window.location.href);
|
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 (S)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Bridge.html" title="Bridge (module)">Bridge</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Serializer</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>Module: Bridge::Serializer
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
82
|
+
<dd class="r1 last">lib/serializer.rb</dd>
|
83
|
+
|
84
|
+
</dl>
|
85
|
+
<div class="clear"></div>
|
86
|
+
|
87
|
+
<h2>Overview</h2><div class="docstring">
|
88
|
+
<div class="discussion">
|
89
|
+
|
90
|
+
<p>:nodoc: all</p>
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
<div class="tags">
|
96
|
+
|
97
|
+
|
98
|
+
</div><h2>Defined Under Namespace</h2>
|
99
|
+
<p class="children">
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Serializer/Callback.html" title="Bridge::Serializer::Callback (class)">Callback</a></span>
|
105
|
+
|
106
|
+
|
107
|
+
</p>
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<h2>
|
117
|
+
Class Method Summary
|
118
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
119
|
+
</h2>
|
120
|
+
|
121
|
+
<ul class="summary">
|
122
|
+
|
123
|
+
<li class="public ">
|
124
|
+
<span class="summary_signature">
|
125
|
+
|
126
|
+
<a href="#serialize-class_method" title="serialize (class method)">+ (Object) <strong>serialize</strong>(bridge, obj) </a>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
</span>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
141
|
+
|
142
|
+
</li>
|
143
|
+
|
144
|
+
|
145
|
+
<li class="public ">
|
146
|
+
<span class="summary_signature">
|
147
|
+
|
148
|
+
<a href="#unserialize-class_method" title="unserialize (class method)">+ (Object) <strong>unserialize</strong>(bridge, obj) </a>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
</span>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
163
|
+
|
164
|
+
</li>
|
165
|
+
|
166
|
+
|
167
|
+
<li class="public ">
|
168
|
+
<span class="summary_signature">
|
169
|
+
|
170
|
+
<a href="#unserialize_helper-class_method" title="unserialize_helper (class method)">+ (Object) <strong>unserialize_helper</strong>(bridge, obj, k, v) </a>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
</span>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
185
|
+
|
186
|
+
</li>
|
187
|
+
|
188
|
+
|
189
|
+
</ul>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
<div id="class_method_details" class="method_details_list">
|
195
|
+
<h2>Class Method Details</h2>
|
196
|
+
|
197
|
+
|
198
|
+
<div class="method_details first">
|
199
|
+
<h3 class="signature first" id="serialize-class_method">
|
200
|
+
|
201
|
+
+ (<tt>Object</tt>) <strong>serialize</strong>(bridge, obj)
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</h3><table class="source_code">
|
208
|
+
<tr>
|
209
|
+
<td>
|
210
|
+
<pre class="lines">
|
211
|
+
|
212
|
+
|
213
|
+
7
|
214
|
+
8
|
215
|
+
9
|
216
|
+
10
|
217
|
+
11
|
218
|
+
12
|
219
|
+
13
|
220
|
+
14
|
221
|
+
15
|
222
|
+
16
|
223
|
+
17
|
224
|
+
18
|
225
|
+
19
|
226
|
+
20
|
227
|
+
21
|
228
|
+
22
|
229
|
+
23
|
230
|
+
24
|
231
|
+
25
|
232
|
+
26
|
233
|
+
27
|
234
|
+
28
|
235
|
+
29
|
236
|
+
30
|
237
|
+
31
|
238
|
+
32
|
239
|
+
33</pre>
|
240
|
+
</td>
|
241
|
+
<td>
|
242
|
+
<pre class="code"><span class="info file"># File 'lib/serializer.rb', line 7</span>
|
243
|
+
|
244
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_serialize'>serialize</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='comma'>,</span> <span class='id identifier rubyid_obj'>obj</span>
|
245
|
+
<span class='comment'># Serialize immediately if obj responds to to_dict
|
246
|
+
</span> <span class='kw'>if</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span> <span class='symbol'>:to_dict</span>
|
247
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_to_dict'>to_dict</span>
|
248
|
+
<span class='comment'># Enumerate hash and serialize each member
|
249
|
+
</span> <span class='kw'>elsif</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Hash</span>
|
250
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
251
|
+
<span class='id identifier rubyid_obj'>obj</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_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
252
|
+
<span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_serialize'>serialize</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span>
|
253
|
+
<span class='kw'>end</span>
|
254
|
+
<span class='comment'># Enumerate array and serialize each member
|
255
|
+
</span> <span class='kw'>elsif</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
|
256
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
257
|
+
<span class='id identifier rubyid_serialize'>serialize</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span>
|
258
|
+
<span class='kw'>end</span>
|
259
|
+
<span class='comment'># Store as callback if callable
|
260
|
+
</span> <span class='kw'>elsif</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:call</span><span class='rparen'>)</span>
|
261
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='period'>.</span><span class='id identifier rubyid_store_object'>store_object</span><span class='lparen'>(</span><span class='const'>Callback</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>callback</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_dict'>to_dict</span>
|
262
|
+
<span class='comment'># Return obj itself is JSON serializable
|
263
|
+
</span> <span class='kw'>elsif</span> <span class='const'>JSON</span><span class='op'>::</span><span class='const'>Ext</span><span class='op'>::</span><span class='const'>Generator</span><span class='op'>::</span><span class='const'>GeneratorMethods</span><span class='period'>.</span><span class='id identifier rubyid_constants'>constants</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
|
264
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span>
|
265
|
+
<span class='comment'># Otherwise store as service. Obj is a class instance or module
|
266
|
+
</span> <span class='kw'>else</span>
|
267
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='period'>.</span><span class='id identifier rubyid_store_object'>store_object</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='comma'>,</span> <span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_find_ops'>find_ops</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_dict'>to_dict</span>
|
268
|
+
<span class='kw'>end</span>
|
269
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_result'>result</span>
|
270
|
+
<span class='kw'>end</span></pre>
|
271
|
+
</td>
|
272
|
+
</tr>
|
273
|
+
</table>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
<div class="method_details ">
|
277
|
+
<h3 class="signature " id="unserialize-class_method">
|
278
|
+
|
279
|
+
+ (<tt>Object</tt>) <strong>unserialize</strong>(bridge, obj)
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
</h3><table class="source_code">
|
286
|
+
<tr>
|
287
|
+
<td>
|
288
|
+
<pre class="lines">
|
289
|
+
|
290
|
+
|
291
|
+
35
|
292
|
+
36
|
293
|
+
37
|
294
|
+
38
|
295
|
+
39
|
296
|
+
40
|
297
|
+
41
|
298
|
+
42
|
299
|
+
43
|
300
|
+
44
|
301
|
+
45</pre>
|
302
|
+
</td>
|
303
|
+
<td>
|
304
|
+
<pre class="code"><span class="info file"># File 'lib/serializer.rb', line 35</span>
|
305
|
+
|
306
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_unserialize'>unserialize</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='comma'>,</span> <span class='id identifier rubyid_obj'>obj</span>
|
307
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Hash</span>
|
308
|
+
<span class='id identifier rubyid_obj'>obj</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_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
309
|
+
<span class='id identifier rubyid_unserialize_helper'>unserialize_helper</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='comma'>,</span> <span class='id identifier rubyid_obj'>obj</span><span class='comma'>,</span> <span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span>
|
310
|
+
<span class='kw'>end</span>
|
311
|
+
<span class='kw'>elsif</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
|
312
|
+
<span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='comma'>,</span> <span class='id identifier rubyid_k'>k</span><span class='op'>|</span>
|
313
|
+
<span class='id identifier rubyid_unserialize_helper'>unserialize_helper</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='comma'>,</span> <span class='id identifier rubyid_obj'>obj</span><span class='comma'>,</span> <span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span>
|
314
|
+
<span class='kw'>end</span>
|
315
|
+
<span class='kw'>end</span>
|
316
|
+
<span class='kw'>end</span></pre>
|
317
|
+
</td>
|
318
|
+
</tr>
|
319
|
+
</table>
|
320
|
+
</div>
|
321
|
+
|
322
|
+
<div class="method_details ">
|
323
|
+
<h3 class="signature " id="unserialize_helper-class_method">
|
324
|
+
|
325
|
+
+ (<tt>Object</tt>) <strong>unserialize_helper</strong>(bridge, obj, k, v)
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
</h3><table class="source_code">
|
332
|
+
<tr>
|
333
|
+
<td>
|
334
|
+
<pre class="lines">
|
335
|
+
|
336
|
+
|
337
|
+
47
|
338
|
+
48
|
339
|
+
49
|
340
|
+
50
|
341
|
+
51
|
342
|
+
52
|
343
|
+
53
|
344
|
+
54
|
345
|
+
55
|
346
|
+
56
|
347
|
+
57
|
348
|
+
58
|
349
|
+
59
|
350
|
+
60
|
351
|
+
61
|
352
|
+
62
|
353
|
+
63
|
354
|
+
64
|
355
|
+
65
|
356
|
+
66
|
357
|
+
67
|
358
|
+
68
|
359
|
+
69
|
360
|
+
70</pre>
|
361
|
+
</td>
|
362
|
+
<td>
|
363
|
+
<pre class="code"><span class="info file"># File 'lib/serializer.rb', line 47</span>
|
364
|
+
|
365
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_unserialize_helper'>unserialize_helper</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='comma'>,</span> <span class='id identifier rubyid_obj'>obj</span><span class='comma'>,</span> <span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span>
|
366
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Hash</span>
|
367
|
+
<span class='comment'># If object has ref key, convert to reference
|
368
|
+
</span> <span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ref</span><span class='tstring_end'>'</span></span>
|
369
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ref</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='period'>.</span><span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_client_id'>client_id</span> <span class='kw'>and</span> <span class='id identifier rubyid_v'>v</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ref</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>client</span><span class='tstring_end'>'</span></span> <span class='kw'>and</span>
|
370
|
+
<span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='period'>.</span><span class='id identifier rubyid_store'>store</span><span class='lbracket'>[</span><span class='id identifier rubyid_v'>v</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ref</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span><span class='rbracket'>]</span>
|
371
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Callback</span>
|
372
|
+
<span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span> <span class='symbol'>:callback</span>
|
373
|
+
<span class='kw'>end</span>
|
374
|
+
<span class='kw'>else</span>
|
375
|
+
<span class='comment'># Create reference
|
376
|
+
</span> <span class='id identifier rubyid_ref'>ref</span> <span class='op'>=</span> <span class='const'>Reference</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_bridge'>bridge</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ref</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>operations</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
377
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>operations</span><span class='tstring_end'>'</span></span> <span class='kw'>and</span> <span class='id identifier rubyid_v'>v</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>operations</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>1</span> <span class='kw'>and</span> <span class='id identifier rubyid_v'>v</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>operations</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>callback</span><span class='tstring_end'>'</span></span>
|
378
|
+
<span class='comment'># Callback wrapper
|
379
|
+
</span> <span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_ref_callback'>ref_callback</span> <span class='id identifier rubyid_ref'>ref</span>
|
380
|
+
<span class='kw'>else</span>
|
381
|
+
<span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_ref'>ref</span>
|
382
|
+
<span class='kw'>end</span>
|
383
|
+
<span class='kw'>end</span>
|
384
|
+
<span class='kw'>return</span>
|
385
|
+
<span class='kw'>end</span>
|
386
|
+
<span class='kw'>end</span>
|
387
|
+
<span class='id identifier rubyid_unserialize'>unserialize</span> <span class='id identifier rubyid_bridge'>bridge</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span>
|
388
|
+
<span class='kw'>end</span></pre>
|
389
|
+
</td>
|
390
|
+
</tr>
|
391
|
+
</table>
|
392
|
+
</div>
|
393
|
+
|
394
|
+
</div>
|
395
|
+
|
396
|
+
</div>
|
397
|
+
|
398
|
+
<div id="footer">
|
399
|
+
Generated on Wed Jun 20 11:00:11 2012 by
|
400
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
401
|
+
0.8.2.1 (ruby-1.9.3).
|
402
|
+
</div>
|
403
|
+
|
404
|
+
</body>
|
405
|
+
</html>
|
@@ -0,0 +1,498 @@
|
|
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: Bridge::Serializer::Callback
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" 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#!" + escape(window.location.href);
|
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 (C)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Bridge.html" title="Bridge (module)">Bridge</a></span></span> » <span class='title'><span class='object_link'><a href="../Serializer.html" title="Bridge::Serializer (module)">Serializer</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Callback</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: Bridge::Serializer::Callback
|
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">Bridge::Serializer::Callback</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/serializer.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<h2>
|
111
|
+
Instance Method Summary
|
112
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
113
|
+
</h2>
|
114
|
+
|
115
|
+
<ul class="summary">
|
116
|
+
|
117
|
+
<li class="public ">
|
118
|
+
<span class="summary_signature">
|
119
|
+
|
120
|
+
<a href="#call-instance_method" title="#call (instance method)">- (Object) <strong>call</strong>(*args) </a>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
</span>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
135
|
+
|
136
|
+
</li>
|
137
|
+
|
138
|
+
|
139
|
+
<li class="public ">
|
140
|
+
<span class="summary_signature">
|
141
|
+
|
142
|
+
<a href="#callback-instance_method" title="#callback (instance method)">- (Object) <strong>callback</strong>(*args) </a>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
</span>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
157
|
+
|
158
|
+
</li>
|
159
|
+
|
160
|
+
|
161
|
+
<li class="public ">
|
162
|
+
<span class="summary_signature">
|
163
|
+
|
164
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Callback) <strong>initialize</strong>(fun) </a>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
</span>
|
169
|
+
|
170
|
+
|
171
|
+
<span class="note title constructor">constructor</span>
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<span class="summary_desc"><div class='inline'>
|
181
|
+
<p>A new instance of Callback.</p>
|
182
|
+
</div></span>
|
183
|
+
|
184
|
+
</li>
|
185
|
+
|
186
|
+
|
187
|
+
<li class="public ">
|
188
|
+
<span class="summary_signature">
|
189
|
+
|
190
|
+
<a href="#method-instance_method" title="#method (instance method)">- (Object) <strong>method</strong>(atom) </a>
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
</span>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
205
|
+
|
206
|
+
</li>
|
207
|
+
|
208
|
+
|
209
|
+
<li class="public ">
|
210
|
+
<span class="summary_signature">
|
211
|
+
|
212
|
+
<a href="#methods-instance_method" title="#methods (instance method)">- (Object) <strong>methods</strong>(bool) </a>
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
</span>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
227
|
+
|
228
|
+
</li>
|
229
|
+
|
230
|
+
|
231
|
+
<li class="public ">
|
232
|
+
<span class="summary_signature">
|
233
|
+
|
234
|
+
<a href="#respond_to%3F-instance_method" title="#respond_to? (instance method)">- (Boolean) <strong>respond_to?</strong>(atom) </a>
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
</span>
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
249
|
+
|
250
|
+
</li>
|
251
|
+
|
252
|
+
|
253
|
+
</ul>
|
254
|
+
|
255
|
+
|
256
|
+
<div id="constructor_details" class="method_details_list">
|
257
|
+
<h2>Constructor Details</h2>
|
258
|
+
|
259
|
+
<div class="method_details first">
|
260
|
+
<h3 class="signature first" id="initialize-instance_method">
|
261
|
+
|
262
|
+
- (<tt><span class='object_link'><a href="" title="Bridge::Serializer::Callback (class)">Callback</a></span></tt>) <strong>initialize</strong>(fun)
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
</h3><div class="docstring">
|
269
|
+
<div class="discussion">
|
270
|
+
|
271
|
+
<p>A new instance of Callback</p>
|
272
|
+
|
273
|
+
|
274
|
+
</div>
|
275
|
+
</div>
|
276
|
+
<div class="tags">
|
277
|
+
|
278
|
+
|
279
|
+
</div><table class="source_code">
|
280
|
+
<tr>
|
281
|
+
<td>
|
282
|
+
<pre class="lines">
|
283
|
+
|
284
|
+
|
285
|
+
73
|
286
|
+
74
|
287
|
+
75</pre>
|
288
|
+
</td>
|
289
|
+
<td>
|
290
|
+
<pre class="code"><span class="info file"># File 'lib/serializer.rb', line 73</span>
|
291
|
+
|
292
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_fun'>fun</span>
|
293
|
+
<span class='ivar'>@fun</span> <span class='op'>=</span> <span class='id identifier rubyid_fun'>fun</span>
|
294
|
+
<span class='kw'>end</span></pre>
|
295
|
+
</td>
|
296
|
+
</tr>
|
297
|
+
</table>
|
298
|
+
</div>
|
299
|
+
|
300
|
+
</div>
|
301
|
+
|
302
|
+
|
303
|
+
<div id="instance_method_details" class="method_details_list">
|
304
|
+
<h2>Instance Method Details</h2>
|
305
|
+
|
306
|
+
|
307
|
+
<div class="method_details first">
|
308
|
+
<h3 class="signature first" id="call-instance_method">
|
309
|
+
|
310
|
+
- (<tt>Object</tt>) <strong>call</strong>(*args)
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
</h3><table class="source_code">
|
317
|
+
<tr>
|
318
|
+
<td>
|
319
|
+
<pre class="lines">
|
320
|
+
|
321
|
+
|
322
|
+
81
|
323
|
+
82
|
324
|
+
83</pre>
|
325
|
+
</td>
|
326
|
+
<td>
|
327
|
+
<pre class="code"><span class="info file"># File 'lib/serializer.rb', line 81</span>
|
328
|
+
|
329
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span>
|
330
|
+
<span class='ivar'>@fun</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
331
|
+
<span class='kw'>end</span></pre>
|
332
|
+
</td>
|
333
|
+
</tr>
|
334
|
+
</table>
|
335
|
+
</div>
|
336
|
+
|
337
|
+
<div class="method_details ">
|
338
|
+
<h3 class="signature " id="callback-instance_method">
|
339
|
+
|
340
|
+
- (<tt>Object</tt>) <strong>callback</strong>(*args)
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
</h3><table class="source_code">
|
347
|
+
<tr>
|
348
|
+
<td>
|
349
|
+
<pre class="lines">
|
350
|
+
|
351
|
+
|
352
|
+
77
|
353
|
+
78
|
354
|
+
79</pre>
|
355
|
+
</td>
|
356
|
+
<td>
|
357
|
+
<pre class="code"><span class="info file"># File 'lib/serializer.rb', line 77</span>
|
358
|
+
|
359
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_callback'>callback</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span>
|
360
|
+
<span class='ivar'>@fun</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span>
|
361
|
+
<span class='kw'>end</span></pre>
|
362
|
+
</td>
|
363
|
+
</tr>
|
364
|
+
</table>
|
365
|
+
</div>
|
366
|
+
|
367
|
+
<div class="method_details ">
|
368
|
+
<h3 class="signature " id="method-instance_method">
|
369
|
+
|
370
|
+
- (<tt>Object</tt>) <strong>method</strong>(atom)
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
</h3><table class="source_code">
|
377
|
+
<tr>
|
378
|
+
<td>
|
379
|
+
<pre class="lines">
|
380
|
+
|
381
|
+
|
382
|
+
85
|
383
|
+
86
|
384
|
+
87
|
385
|
+
88
|
386
|
+
89
|
387
|
+
90
|
388
|
+
91</pre>
|
389
|
+
</td>
|
390
|
+
<td>
|
391
|
+
<pre class="code"><span class="info file"># File 'lib/serializer.rb', line 85</span>
|
392
|
+
|
393
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_method'>method</span> <span class='id identifier rubyid_atom'>atom</span>
|
394
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_atom'>atom</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>callback</span><span class='tstring_end'>'</span></span>
|
395
|
+
<span class='ivar'>@fun</span>
|
396
|
+
<span class='kw'>else</span>
|
397
|
+
<span class='const'>Class</span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span> <span class='id identifier rubyid_atom'>atom</span>
|
398
|
+
<span class='kw'>end</span>
|
399
|
+
<span class='kw'>end</span></pre>
|
400
|
+
</td>
|
401
|
+
</tr>
|
402
|
+
</table>
|
403
|
+
</div>
|
404
|
+
|
405
|
+
<div class="method_details ">
|
406
|
+
<h3 class="signature " id="methods-instance_method">
|
407
|
+
|
408
|
+
- (<tt>Object</tt>) <strong>methods</strong>(bool)
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
</h3><table class="source_code">
|
415
|
+
<tr>
|
416
|
+
<td>
|
417
|
+
<pre class="lines">
|
418
|
+
|
419
|
+
|
420
|
+
93
|
421
|
+
94
|
422
|
+
95</pre>
|
423
|
+
</td>
|
424
|
+
<td>
|
425
|
+
<pre class="code"><span class="info file"># File 'lib/serializer.rb', line 93</span>
|
426
|
+
|
427
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_methods'>methods</span> <span class='id identifier rubyid_bool'>bool</span>
|
428
|
+
<span class='lbracket'>[</span><span class='symbol'>:callback</span><span class='rbracket'>]</span>
|
429
|
+
<span class='kw'>end</span></pre>
|
430
|
+
</td>
|
431
|
+
</tr>
|
432
|
+
</table>
|
433
|
+
</div>
|
434
|
+
|
435
|
+
<div class="method_details ">
|
436
|
+
<h3 class="signature " id="respond_to?-instance_method">
|
437
|
+
|
438
|
+
- (<tt>Boolean</tt>) <strong>respond_to?</strong>(atom)
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
</h3><div class="docstring">
|
445
|
+
<div class="discussion">
|
446
|
+
|
447
|
+
|
448
|
+
</div>
|
449
|
+
</div>
|
450
|
+
<div class="tags">
|
451
|
+
|
452
|
+
<p class="tag_title">Returns:</p>
|
453
|
+
<ul class="return">
|
454
|
+
|
455
|
+
<li>
|
456
|
+
|
457
|
+
|
458
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
</li>
|
463
|
+
|
464
|
+
</ul>
|
465
|
+
|
466
|
+
</div><table class="source_code">
|
467
|
+
<tr>
|
468
|
+
<td>
|
469
|
+
<pre class="lines">
|
470
|
+
|
471
|
+
|
472
|
+
97
|
473
|
+
98
|
474
|
+
99</pre>
|
475
|
+
</td>
|
476
|
+
<td>
|
477
|
+
<pre class="code"><span class="info file"># File 'lib/serializer.rb', line 97</span>
|
478
|
+
|
479
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_respond_to?'>respond_to?</span> <span class='id identifier rubyid_atom'>atom</span>
|
480
|
+
<span class='id identifier rubyid_atom'>atom</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>callback</span><span class='tstring_end'>'</span></span> <span class='op'>||</span> <span class='const'>Class</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_atom'>atom</span><span class='rparen'>)</span>
|
481
|
+
<span class='kw'>end</span></pre>
|
482
|
+
</td>
|
483
|
+
</tr>
|
484
|
+
</table>
|
485
|
+
</div>
|
486
|
+
|
487
|
+
</div>
|
488
|
+
|
489
|
+
</div>
|
490
|
+
|
491
|
+
<div id="footer">
|
492
|
+
Generated on Wed Jun 20 11:00:11 2012 by
|
493
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
494
|
+
0.8.2.1 (ruby-1.9.3).
|
495
|
+
</div>
|
496
|
+
|
497
|
+
</body>
|
498
|
+
</html>
|