marilyn-rpc 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +39 -4
- data/examples/async/client.rb +0 -5
- data/examples/authentication/client.rb +18 -0
- data/examples/authentication/server.rb +30 -0
- data/lib/marilyn-rpc.rb +1 -1
- data/lib/marilyn-rpc/client.rb +21 -3
- data/lib/marilyn-rpc/error.rb +13 -0
- data/lib/marilyn-rpc/mails.rb +3 -3
- data/lib/marilyn-rpc/server.rb +6 -11
- data/lib/marilyn-rpc/service.rb +86 -11
- data/lib/marilyn-rpc/service_cache.rb +44 -23
- data/lib/marilyn-rpc/version.rb +1 -1
- data/spec/mails_spec.rb +2 -1
- data/spec/server_spec.rb +1 -1
- data/spec/service_cache_spec.rb +140 -0
- data/spec/service_spec.rb +56 -5
- data/spec/spec_helper.rb +5 -0
- metadata +10 -34
- data/doc/MarilynRPC.html +0 -108
- data/doc/MarilynRPC/CallRequestMail.html +0 -578
- data/doc/MarilynRPC/CallResponseMail.html +0 -418
- data/doc/MarilynRPC/Envelope.html +0 -705
- data/doc/MarilynRPC/ExceptionMail.html +0 -338
- data/doc/MarilynRPC/Gentleman.html +0 -658
- data/doc/MarilynRPC/MailFactory.html +0 -284
- data/doc/MarilynRPC/MailHelper.html +0 -489
- data/doc/MarilynRPC/NativeClient.html +0 -579
- data/doc/MarilynRPC/NativeClientProxy.html +0 -303
- data/doc/MarilynRPC/Server.html +0 -406
- data/doc/MarilynRPC/Service.html +0 -599
- data/doc/MarilynRPC/ServiceCache.html +0 -481
- data/doc/_index.html +0 -219
- data/doc/class_list.html +0 -36
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -53
- data/doc/css/style.css +0 -318
- data/doc/file.README.html +0 -154
- data/doc/file_list.html +0 -38
- data/doc/frames.html +0 -13
- data/doc/index.html +0 -154
- data/doc/js/app.js +0 -203
- data/doc/js/full_list.js +0 -149
- data/doc/js/jquery.js +0 -16
- data/doc/method_list.html +0 -467
- data/doc/top-level-namespace.html +0 -88
- data/spec/service_cache.rb +0 -45
@@ -1,284 +0,0 @@
|
|
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>Module: MarilynRPC::MailFactory</title>
|
7
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
-
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
11
|
-
relpath = '..';
|
12
|
-
if (relpath != '') relpath += '/';
|
13
|
-
</script>
|
14
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<script type="text/javascript" charset="utf-8">
|
20
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<div id="header">
|
24
|
-
<div id="menu">
|
25
|
-
|
26
|
-
<a href="../_index.html">Index (M)</a> »
|
27
|
-
<span class='title'><span class='object_link'><a href="../MarilynRPC.html" title="MarilynRPC (module)">MarilynRPC</a></span></span>
|
28
|
-
»
|
29
|
-
<span class="title">MailFactory</span>
|
30
|
-
|
31
|
-
|
32
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="search">
|
36
|
-
<a id="class_list_link" href="#">Class List</a>
|
37
|
-
<a id="method_list_link" href="#">Method List</a>
|
38
|
-
<a id ="file_list_link" href="#">File List</a>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div class="clear"></div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<iframe id="search_frame"></iframe>
|
45
|
-
|
46
|
-
<div id="content"><h1>Module: MarilynRPC::MailFactory
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
</h1>
|
51
|
-
|
52
|
-
<dl class="box">
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
<dt class="r1 last">Defined in:</dt>
|
62
|
-
<dd class="r1 last">lib/marilyn-rpc/mails.rb</dd>
|
63
|
-
|
64
|
-
</dl>
|
65
|
-
<div class="clear"></div>
|
66
|
-
|
67
|
-
<h2>Overview</h2><div class="docstring">
|
68
|
-
<div class="discussion">
|
69
|
-
<p>Helper to destiguish between the different mails</p>
|
70
|
-
|
71
|
-
</div>
|
72
|
-
</div>
|
73
|
-
<div class="tags">
|
74
|
-
|
75
|
-
</div>
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<h2>
|
80
|
-
Class Method Summary
|
81
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
82
|
-
</h2>
|
83
|
-
|
84
|
-
<ul class="summary">
|
85
|
-
|
86
|
-
<li class="public ">
|
87
|
-
<span class="summary_signature">
|
88
|
-
|
89
|
-
<a href="#build_call-class_method" title="build_call (class method)">+ (Object) <strong>build_call</strong>(tag, path, method_name, args) </a>
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
</span>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
<span class="summary_desc"><div class='inline'><p>builds the binary data for a method call.</p></div></span>
|
103
|
-
|
104
|
-
</li>
|
105
|
-
|
106
|
-
|
107
|
-
<li class="public ">
|
108
|
-
<span class="summary_signature">
|
109
|
-
|
110
|
-
<a href="#unpack-class_method" title="unpack (class method)">+ (MarilynRPC::CallRequestMail, ...) <strong>unpack</strong>(envelope) </a>
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
</span>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
<span class="summary_desc"><div class='inline'><p>Parses the envelop and generate the correct mail.</p></div></span>
|
124
|
-
|
125
|
-
</li>
|
126
|
-
|
127
|
-
|
128
|
-
</ul>
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
<div id="class_method_details" class="method_details_list">
|
134
|
-
<h2>Class Method Details</h2>
|
135
|
-
|
136
|
-
|
137
|
-
<div class="method_details first">
|
138
|
-
<p class="signature first" id="build_call-class_method">
|
139
|
-
|
140
|
-
+ (<tt>Object</tt>) <strong>build_call</strong>(tag, path, method_name, args)
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
</p><div class="docstring">
|
145
|
-
<div class="discussion">
|
146
|
-
<p>builds the binary data for a method call</p>
|
147
|
-
|
148
|
-
</div>
|
149
|
-
</div>
|
150
|
-
<div class="tags">
|
151
|
-
|
152
|
-
</div><table class="source_code">
|
153
|
-
<tr>
|
154
|
-
<td>
|
155
|
-
<pre class="lines">
|
156
|
-
|
157
|
-
|
158
|
-
96
|
159
|
-
97
|
160
|
-
98
|
161
|
-
99</pre>
|
162
|
-
</td>
|
163
|
-
<td>
|
164
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 96</span>
|
165
|
-
|
166
|
-
<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='build_call identifier id'>build_call</span><span class='lparen token'>(</span><span class='tag identifier id'>tag</span><span class='comma token'>,</span> <span class='path identifier id'>path</span><span class='comma token'>,</span> <span class='method_name identifier id'>method_name</span><span class='comma token'>,</span> <span class='args identifier id'>args</span><span class='rparen token'>)</span>
|
167
|
-
<span class='mail identifier id'>mail</span> <span class='assign token'>=</span> <span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='CallRequestMail constant id'>CallRequestMail</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='tag identifier id'>tag</span><span class='comma token'>,</span> <span class='path identifier id'>path</span><span class='comma token'>,</span> <span class='method_name identifier id'>method_name</span><span class='comma token'>,</span> <span class='args identifier id'>args</span><span class='rparen token'>)</span>
|
168
|
-
<span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='Envelope constant id'>Envelope</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='mail identifier id'>mail</span><span class='dot token'>.</span><span class='encode identifier id'>encode</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='encode identifier id'>encode</span>
|
169
|
-
<span class='end end kw'>end</span>
|
170
|
-
</pre>
|
171
|
-
</td>
|
172
|
-
</tr>
|
173
|
-
</table>
|
174
|
-
</div>
|
175
|
-
|
176
|
-
<div class="method_details ">
|
177
|
-
<p class="signature " id="unpack-class_method">
|
178
|
-
|
179
|
-
+ (<tt><span class='object_link'><a href="CallRequestMail.html" title="MarilynRPC::CallRequestMail (class)">MarilynRPC::CallRequestMail</a></span></tt>, ...) <strong>unpack</strong>(envelope)
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
</p><div class="docstring">
|
184
|
-
<div class="discussion">
|
185
|
-
<p>Parses the envelop and generate the correct mail.</p>
|
186
|
-
|
187
|
-
</div>
|
188
|
-
</div>
|
189
|
-
<div class="tags">
|
190
|
-
<h3>Parameters:</h3>
|
191
|
-
<ul class="param">
|
192
|
-
|
193
|
-
<li>
|
194
|
-
|
195
|
-
<span class='type'>(<tt><span class='object_link'><a href="Envelope.html" title="MarilynRPC::Envelope (class)">MarilynRPC::Envelope</a></span></tt>)</span>
|
196
|
-
|
197
|
-
|
198
|
-
<span class='name'>envelope</span>
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
—
|
203
|
-
<div class='inline'><p>the envelope which contains a mail</p></div>
|
204
|
-
|
205
|
-
</li>
|
206
|
-
|
207
|
-
</ul>
|
208
|
-
<h3>Returns:</h3>
|
209
|
-
<ul class="return">
|
210
|
-
|
211
|
-
<li>
|
212
|
-
|
213
|
-
<span class='type'>(<tt><span class='object_link'><a href="CallRequestMail.html" title="MarilynRPC::CallRequestMail (class)">MarilynRPC::CallRequestMail</a></span></tt>, <tt><span class='object_link'><a href="CallResponseMail.html" title="MarilynRPC::CallResponseMail (class)">MarilynRPC::CallResponseMail</a></span></tt>, <tt><span class='object_link'><a href="ExceptionMail.html" title="MarilynRPC::ExceptionMail (class)">MarilynRPC::ExceptionMail</a></span></tt>)</span>
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
—
|
219
|
-
<div class='inline'><p>the mail object that was extracted</p></div>
|
220
|
-
|
221
|
-
</li>
|
222
|
-
|
223
|
-
</ul>
|
224
|
-
|
225
|
-
</div><table class="source_code">
|
226
|
-
<tr>
|
227
|
-
<td>
|
228
|
-
<pre class="lines">
|
229
|
-
|
230
|
-
|
231
|
-
78
|
232
|
-
79
|
233
|
-
80
|
234
|
-
81
|
235
|
-
82
|
236
|
-
83
|
237
|
-
84
|
238
|
-
85
|
239
|
-
86
|
240
|
-
87
|
241
|
-
88
|
242
|
-
89
|
243
|
-
90
|
244
|
-
91
|
245
|
-
92
|
246
|
-
93</pre>
|
247
|
-
</td>
|
248
|
-
<td>
|
249
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 78</span>
|
250
|
-
|
251
|
-
<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='unpack identifier id'>unpack</span><span class='lparen token'>(</span><span class='envelope identifier id'>envelope</span><span class='rparen token'>)</span>
|
252
|
-
<span class='data identifier id'>data</span> <span class='assign token'>=</span> <span class='envelope identifier id'>envelope</span><span class='dot token'>.</span><span class='content identifier id'>content</span>
|
253
|
-
<span class='type identifier id'>type</span> <span class='assign token'>=</span> <span class='data identifier id'>data</span><span class='dot token'>.</span><span class='slice identifier id'>slice</span><span class='lparen token'>(</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='integer val'>1</span><span class='rparen token'>)</span>
|
254
|
-
<span class='case case kw'>case</span> <span class='type identifier id'>type</span>
|
255
|
-
<span class='when when kw'>when</span> <span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='CallRequestMail constant id'>CallRequestMail</span><span class='colon2 op'>::</span><span class='TYPE constant id'>TYPE</span>
|
256
|
-
<span class='mail identifier id'>mail</span> <span class='assign token'>=</span> <span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='CallRequestMail constant id'>CallRequestMail</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
|
257
|
-
<span class='when when kw'>when</span> <span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='CallResponseMail constant id'>CallResponseMail</span><span class='colon2 op'>::</span><span class='TYPE constant id'>TYPE</span>
|
258
|
-
<span class='mail identifier id'>mail</span> <span class='assign token'>=</span> <span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='CallResponseMail constant id'>CallResponseMail</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
|
259
|
-
<span class='when when kw'>when</span> <span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='ExceptionMail constant id'>ExceptionMail</span><span class='colon2 op'>::</span><span class='TYPE constant id'>TYPE</span>
|
260
|
-
<span class='mail identifier id'>mail</span> <span class='assign token'>=</span> <span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='ExceptionMail constant id'>ExceptionMail</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
|
261
|
-
<span class='else else kw'>else</span>
|
262
|
-
<span class='raise identifier id'>raise</span> <span class='ArgumentError constant id'>ArgumentError</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='dstring node'>"The passed type #{type.inspect} is unknown!"</span><span class='rparen token'>)</span>
|
263
|
-
<span class='end end kw'>end</span>
|
264
|
-
<span class='mail identifier id'>mail</span><span class='dot token'>.</span><span class='decode identifier id'>decode</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span>
|
265
|
-
<span class='mail identifier id'>mail</span>
|
266
|
-
<span class='end end kw'>end</span>
|
267
|
-
</pre>
|
268
|
-
</td>
|
269
|
-
</tr>
|
270
|
-
</table>
|
271
|
-
</div>
|
272
|
-
|
273
|
-
</div>
|
274
|
-
|
275
|
-
</div>
|
276
|
-
|
277
|
-
<div id="footer">
|
278
|
-
Generated on Wed Jun 8 18:26:47 2011 by
|
279
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
280
|
-
0.6.8 (ruby-1.8.7).
|
281
|
-
</div>
|
282
|
-
|
283
|
-
</body>
|
284
|
-
</html>
|
@@ -1,489 +0,0 @@
|
|
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>Module: MarilynRPC::MailHelper</title>
|
7
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
-
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
11
|
-
relpath = '..';
|
12
|
-
if (relpath != '') relpath += '/';
|
13
|
-
</script>
|
14
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<script type="text/javascript" charset="utf-8">
|
20
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<div id="header">
|
24
|
-
<div id="menu">
|
25
|
-
|
26
|
-
<a href="../_index.html">Index (M)</a> »
|
27
|
-
<span class='title'><span class='object_link'><a href="../MarilynRPC.html" title="MarilynRPC (module)">MarilynRPC</a></span></span>
|
28
|
-
»
|
29
|
-
<span class="title">MailHelper</span>
|
30
|
-
|
31
|
-
|
32
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="search">
|
36
|
-
<a id="class_list_link" href="#">Class List</a>
|
37
|
-
<a id="method_list_link" href="#">Method List</a>
|
38
|
-
<a id ="file_list_link" href="#">File List</a>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div class="clear"></div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<iframe id="search_frame"></iframe>
|
45
|
-
|
46
|
-
<div id="content"><h1>Module: MarilynRPC::MailHelper
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
</h1>
|
51
|
-
|
52
|
-
<dl class="box">
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
<dt class="r1">Included in:</dt>
|
61
|
-
<dd class="r1"><span class='object_link'><a href="CallRequestMail.html" title="MarilynRPC::CallRequestMail (class)">CallRequestMail</a></span>, <span class='object_link'><a href="CallResponseMail.html" title="MarilynRPC::CallResponseMail (class)">CallResponseMail</a></span>, <span class='object_link'><a href="ExceptionMail.html" title="MarilynRPC::ExceptionMail (class)">ExceptionMail</a></span></dd>
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
<dt class="r2 last">Defined in:</dt>
|
66
|
-
<dd class="r2 last">lib/marilyn-rpc/mails.rb</dd>
|
67
|
-
|
68
|
-
</dl>
|
69
|
-
<div class="clear"></div>
|
70
|
-
|
71
|
-
<h2>Overview</h2><div class="docstring">
|
72
|
-
<div class="discussion">
|
73
|
-
<p>Helper that gets mixed into the mail classes to make common things easyer</p>
|
74
|
-
|
75
|
-
</div>
|
76
|
-
</div>
|
77
|
-
<div class="tags">
|
78
|
-
|
79
|
-
</div>
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
<h2>
|
84
|
-
Class Method Summary
|
85
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
86
|
-
</h2>
|
87
|
-
|
88
|
-
<ul class="summary">
|
89
|
-
|
90
|
-
<li class="public ">
|
91
|
-
<span class="summary_signature">
|
92
|
-
|
93
|
-
<a href="#type-class_method" title="type (class method)">+ (Object) <strong>type</strong>(nr) </a>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
</span>
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<span class="summary_desc"><div class='inline'><p>generate a new serialize id which can be used in a mail.</p></div></span>
|
107
|
-
|
108
|
-
</li>
|
109
|
-
|
110
|
-
|
111
|
-
</ul>
|
112
|
-
|
113
|
-
<h2>
|
114
|
-
Instance Method Summary
|
115
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
116
|
-
</h2>
|
117
|
-
|
118
|
-
<ul class="summary">
|
119
|
-
|
120
|
-
<li class="public ">
|
121
|
-
<span class="summary_signature">
|
122
|
-
|
123
|
-
<a href="#deserialize-instance_method" title="#deserialize (instance method)">- (Object) <strong>deserialize</strong>(data) </a>
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
</span>
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
<span class="summary_desc"><div class='inline'><p>deserializes the passed data to the original objects.</p></div></span>
|
137
|
-
|
138
|
-
</li>
|
139
|
-
|
140
|
-
|
141
|
-
<li class="public ">
|
142
|
-
<span class="summary_signature">
|
143
|
-
|
144
|
-
<a href="#only_data-instance_method" title="#only_data (instance method)">- (String) <strong>only_data</strong>(data) </a>
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
</span>
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
<span class="summary_desc"><div class='inline'><p>extracts the real data and ignores the type information.</p></div></span>
|
158
|
-
|
159
|
-
</li>
|
160
|
-
|
161
|
-
|
162
|
-
<li class="public ">
|
163
|
-
<span class="summary_signature">
|
164
|
-
|
165
|
-
<a href="#serialize-instance_method" title="#serialize (instance method)">- (Object) <strong>serialize</strong>(data) </a>
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
</span>
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
<span class="summary_desc"><div class='inline'><p>serialize the data using marilyns default serializer.</p></div></span>
|
179
|
-
|
180
|
-
</li>
|
181
|
-
|
182
|
-
|
183
|
-
</ul>
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
<div id="class_method_details" class="method_details_list">
|
189
|
-
<h2>Class Method Details</h2>
|
190
|
-
|
191
|
-
|
192
|
-
<div class="method_details first">
|
193
|
-
<p class="signature first" id="type-class_method">
|
194
|
-
|
195
|
-
+ (<tt>Object</tt>) <strong>type</strong>(nr)
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
</p><div class="docstring">
|
200
|
-
<div class="discussion">
|
201
|
-
<p>generate a new serialize id which can be used in a mail</p>
|
202
|
-
|
203
|
-
</div>
|
204
|
-
</div>
|
205
|
-
<div class="tags">
|
206
|
-
<h3>Parameters:</h3>
|
207
|
-
<ul class="param">
|
208
|
-
|
209
|
-
<li>
|
210
|
-
|
211
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
212
|
-
|
213
|
-
|
214
|
-
<span class='name'>a</span>
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
—
|
219
|
-
<div class='inline'><p>number between 0 and 254</p></div>
|
220
|
-
|
221
|
-
</li>
|
222
|
-
|
223
|
-
<li>
|
224
|
-
|
225
|
-
<span class='type'>(<tt>String</tt>)</span>
|
226
|
-
|
227
|
-
|
228
|
-
<span class='name'>returns</span>
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
—
|
233
|
-
<div class='inline'><p>an 1 byte string as type id</p></div>
|
234
|
-
|
235
|
-
</li>
|
236
|
-
|
237
|
-
</ul>
|
238
|
-
|
239
|
-
</div><table class="source_code">
|
240
|
-
<tr>
|
241
|
-
<td>
|
242
|
-
<pre class="lines">
|
243
|
-
|
244
|
-
|
245
|
-
7
|
246
|
-
8
|
247
|
-
9</pre>
|
248
|
-
</td>
|
249
|
-
<td>
|
250
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 7</span>
|
251
|
-
|
252
|
-
<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='type identifier id'>type</span><span class='lparen token'>(</span><span class='nr identifier id'>nr</span><span class='rparen token'>)</span>
|
253
|
-
<span class='lbrack token'>[</span><span class='nr identifier id'>nr</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='pack identifier id'>pack</span><span class='lparen token'>(</span><span class='string val'>"c"</span><span class='rparen token'>)</span>
|
254
|
-
<span class='end end kw'>end</span>
|
255
|
-
</pre>
|
256
|
-
</td>
|
257
|
-
</tr>
|
258
|
-
</table>
|
259
|
-
</div>
|
260
|
-
|
261
|
-
</div>
|
262
|
-
|
263
|
-
<div id="instance_method_details" class="method_details_list">
|
264
|
-
<h2>Instance Method Details</h2>
|
265
|
-
|
266
|
-
|
267
|
-
<div class="method_details first">
|
268
|
-
<p class="signature first" id="deserialize-instance_method">
|
269
|
-
|
270
|
-
- (<tt>Object</tt>) <strong>deserialize</strong>(data)
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
</p><div class="docstring">
|
275
|
-
<div class="discussion">
|
276
|
-
<p>deserializes the passed data to the original objects</p>
|
277
|
-
|
278
|
-
</div>
|
279
|
-
</div>
|
280
|
-
<div class="tags">
|
281
|
-
<h3>Parameters:</h3>
|
282
|
-
<ul class="param">
|
283
|
-
|
284
|
-
<li>
|
285
|
-
|
286
|
-
<span class='type'>(<tt>String</tt>)</span>
|
287
|
-
|
288
|
-
|
289
|
-
<span class='name'>data</span>
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
—
|
294
|
-
<div class='inline'><p>the serialized data</p></div>
|
295
|
-
|
296
|
-
</li>
|
297
|
-
|
298
|
-
</ul>
|
299
|
-
<h3>Returns:</h3>
|
300
|
-
<ul class="return">
|
301
|
-
|
302
|
-
<li>
|
303
|
-
|
304
|
-
<span class='type'>(<tt>Object</tt>)</span>
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
—
|
310
|
-
<div class='inline'><p>the deserialized object</p></div>
|
311
|
-
|
312
|
-
</li>
|
313
|
-
|
314
|
-
</ul>
|
315
|
-
|
316
|
-
</div><table class="source_code">
|
317
|
-
<tr>
|
318
|
-
<td>
|
319
|
-
<pre class="lines">
|
320
|
-
|
321
|
-
|
322
|
-
28
|
323
|
-
29
|
324
|
-
30</pre>
|
325
|
-
</td>
|
326
|
-
<td>
|
327
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 28</span>
|
328
|
-
|
329
|
-
<span class='def def kw'>def</span> <span class='deserialize identifier id'>deserialize</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span>
|
330
|
-
<span class='Marshal constant id'>Marshal</span><span class='dot token'>.</span><span class='load identifier id'>load</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span>
|
331
|
-
<span class='end end kw'>end</span>
|
332
|
-
</pre>
|
333
|
-
</td>
|
334
|
-
</tr>
|
335
|
-
</table>
|
336
|
-
</div>
|
337
|
-
|
338
|
-
<div class="method_details ">
|
339
|
-
<p class="signature " id="only_data-instance_method">
|
340
|
-
|
341
|
-
- (<tt>String</tt>) <strong>only_data</strong>(data)
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
</p><div class="docstring">
|
346
|
-
<div class="discussion">
|
347
|
-
<p>extracts the real data and ignores the type information</p>
|
348
|
-
|
349
|
-
</div>
|
350
|
-
</div>
|
351
|
-
<div class="tags">
|
352
|
-
<h3>Parameters:</h3>
|
353
|
-
<ul class="param">
|
354
|
-
|
355
|
-
<li>
|
356
|
-
|
357
|
-
<span class='type'>(<tt>String</tt>)</span>
|
358
|
-
|
359
|
-
|
360
|
-
<span class='name'>data</span>
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
—
|
365
|
-
<div class='inline'><p>the data to extract the mail from</p></div>
|
366
|
-
|
367
|
-
</li>
|
368
|
-
|
369
|
-
</ul>
|
370
|
-
<h3>Returns:</h3>
|
371
|
-
<ul class="return">
|
372
|
-
|
373
|
-
<li>
|
374
|
-
|
375
|
-
<span class='type'>(<tt>String</tt>)</span>
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
—
|
381
|
-
<div class='inline'><p>the extracted data</p></div>
|
382
|
-
|
383
|
-
</li>
|
384
|
-
|
385
|
-
</ul>
|
386
|
-
|
387
|
-
</div><table class="source_code">
|
388
|
-
<tr>
|
389
|
-
<td>
|
390
|
-
<pre class="lines">
|
391
|
-
|
392
|
-
|
393
|
-
14
|
394
|
-
15
|
395
|
-
16</pre>
|
396
|
-
</td>
|
397
|
-
<td>
|
398
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 14</span>
|
399
|
-
|
400
|
-
<span class='def def kw'>def</span> <span class='only_data identifier id'>only_data</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span>
|
401
|
-
<span class='data identifier id'>data</span><span class='dot token'>.</span><span class='slice identifier id'>slice</span><span class='lparen token'>(</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='data identifier id'>data</span><span class='dot token'>.</span><span class='size identifier id'>size</span><span class='rparen token'>)</span>
|
402
|
-
<span class='end end kw'>end</span>
|
403
|
-
</pre>
|
404
|
-
</td>
|
405
|
-
</tr>
|
406
|
-
</table>
|
407
|
-
</div>
|
408
|
-
|
409
|
-
<div class="method_details ">
|
410
|
-
<p class="signature " id="serialize-instance_method">
|
411
|
-
|
412
|
-
- (<tt>Object</tt>) <strong>serialize</strong>(data)
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
</p><div class="docstring">
|
417
|
-
<div class="discussion">
|
418
|
-
<p>serialize the data using marilyns default serializer</p>
|
419
|
-
|
420
|
-
</div>
|
421
|
-
</div>
|
422
|
-
<div class="tags">
|
423
|
-
<h3>Parameters:</h3>
|
424
|
-
<ul class="param">
|
425
|
-
|
426
|
-
<li>
|
427
|
-
|
428
|
-
<span class='type'>(<tt>Object</tt>)</span>
|
429
|
-
|
430
|
-
|
431
|
-
<span class='name'>data</span>
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
—
|
436
|
-
<div class='inline'><p>the data to encode</p></div>
|
437
|
-
|
438
|
-
</li>
|
439
|
-
|
440
|
-
<li>
|
441
|
-
|
442
|
-
<span class='type'>(<tt>String</tt>)</span>
|
443
|
-
|
444
|
-
|
445
|
-
<span class='name'>the</span>
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
—
|
450
|
-
<div class='inline'><p>serialized data</p></div>
|
451
|
-
|
452
|
-
</li>
|
453
|
-
|
454
|
-
</ul>
|
455
|
-
|
456
|
-
</div><table class="source_code">
|
457
|
-
<tr>
|
458
|
-
<td>
|
459
|
-
<pre class="lines">
|
460
|
-
|
461
|
-
|
462
|
-
21
|
463
|
-
22
|
464
|
-
23</pre>
|
465
|
-
</td>
|
466
|
-
<td>
|
467
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 21</span>
|
468
|
-
|
469
|
-
<span class='def def kw'>def</span> <span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span>
|
470
|
-
<span class='Marshal constant id'>Marshal</span><span class='dot token'>.</span><span class='dump identifier id'>dump</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span>
|
471
|
-
<span class='end end kw'>end</span>
|
472
|
-
</pre>
|
473
|
-
</td>
|
474
|
-
</tr>
|
475
|
-
</table>
|
476
|
-
</div>
|
477
|
-
|
478
|
-
</div>
|
479
|
-
|
480
|
-
</div>
|
481
|
-
|
482
|
-
<div id="footer">
|
483
|
-
Generated on Wed Jun 8 18:26:47 2011 by
|
484
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
485
|
-
0.6.8 (ruby-1.8.7).
|
486
|
-
</div>
|
487
|
-
|
488
|
-
</body>
|
489
|
-
</html>
|