caricature 0.3.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Rakefile +100 -0
- data/VERSION +1 -0
- data/caricature.gemspec +177 -0
- data/doc/Array.html +251 -0
- data/doc/Caricature/ArgumentRecording.html +366 -0
- data/doc/Caricature/ClrClassDescriptor.html +303 -0
- data/doc/Caricature/ClrClassMessenger.html +263 -0
- data/doc/Caricature/ClrInterfaceDescriptor.html +295 -0
- data/doc/Caricature/ClrInterfaceIsolator.html +365 -0
- data/doc/Caricature/ClrInterfaceMessenger.html +260 -0
- data/doc/Caricature/ClrIsolator.html +424 -0
- data/doc/Caricature/Expectation.html +549 -0
- data/doc/Caricature/ExpectationBuilder.html +308 -0
- data/doc/Caricature/ExpectationSyntax.html +438 -0
- data/doc/Caricature/Expectations.html +344 -0
- data/doc/Caricature/Interception/ClassMethods.html +246 -0
- data/doc/Caricature/Interception.html +416 -0
- data/doc/Caricature/Isolation.html +578 -0
- data/doc/Caricature/Isolator.html +519 -0
- data/doc/Caricature/MemberDescriptor.html +335 -0
- data/doc/Caricature/Messenger.html +335 -0
- data/doc/Caricature/MethodCallRecorder.html +440 -0
- data/doc/Caricature/MethodCallRecording.html +493 -0
- data/doc/Caricature/RubyIsolator.html +416 -0
- data/doc/Caricature/RubyMessenger.html +260 -0
- data/doc/Caricature/RubyObjectDescriptor.html +289 -0
- data/doc/Caricature/TypeDescriptor.html +378 -0
- data/doc/Caricature/Verification.html +443 -0
- data/doc/Caricature.html +358 -0
- data/doc/Class.html +287 -0
- data/doc/Hash.html +255 -0
- data/doc/Module.html +287 -0
- data/doc/Object.html +322 -0
- data/doc/README_markdown.html +241 -0
- data/doc/String.html +289 -0
- data/doc/System/String.html +289 -0
- data/doc/System/Type.html +289 -0
- data/doc/System.html +207 -0
- data/doc/created.rid +1 -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/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_green.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 +312 -0
- data/doc/js/darkfish.js +116 -0
- data/doc/js/jquery.js +32 -0
- data/doc/js/quicksearch.js +114 -0
- data/doc/js/thickbox-compressed.js +10 -0
- data/doc/lib/caricature/clr/descriptor_rb.html +52 -0
- data/doc/lib/caricature/clr/isolation_rb.html +52 -0
- data/doc/lib/caricature/clr/isolator_rb.html +52 -0
- data/doc/lib/caricature/clr/messenger_rb.html +52 -0
- data/doc/lib/caricature/clr_rb.html +52 -0
- data/doc/lib/caricature/descriptor_rb.html +52 -0
- data/doc/lib/caricature/expectation_rb.html +52 -0
- data/doc/lib/caricature/isolation_rb.html +52 -0
- data/doc/lib/caricature/isolator_rb.html +52 -0
- data/doc/lib/caricature/messaging_rb.html +52 -0
- data/doc/lib/caricature/method_call_recorder_rb.html +52 -0
- data/doc/lib/caricature/verification_rb.html +52 -0
- data/doc/lib/caricature_rb.html +52 -0
- data/doc/lib/core_ext/array_rb.html +52 -0
- data/doc/lib/core_ext/class_rb.html +52 -0
- data/doc/lib/core_ext/core_ext_rb.html +52 -0
- data/doc/lib/core_ext/hash_rb.html +52 -0
- data/doc/lib/core_ext/module_rb.html +52 -0
- data/doc/lib/core_ext/object_rb.html +52 -0
- data/doc/lib/core_ext/string_rb.html +52 -0
- data/doc/lib/core_ext/system/string_rb.html +52 -0
- data/doc/lib/core_ext/system/type_rb.html +52 -0
- data/doc/rdoc.css +696 -0
- data/irb_init.rb +9 -0
- data/lib/bin/Workarounds.dll +0 -0
- data/lib/bin/Workarounds.pdb +0 -0
- data/lib/caricature/clr/descriptor.rb +55 -0
- data/lib/caricature/clr/isolation.rb +33 -0
- data/lib/caricature/clr/isolator.rb +112 -0
- data/lib/caricature/clr/messenger.rb +46 -0
- data/lib/caricature/clr.rb +6 -0
- data/lib/caricature/descriptor.rb +74 -0
- data/lib/caricature/expectation.rb +159 -0
- data/lib/caricature/isolation.rb +146 -0
- data/lib/caricature/isolator.rb +287 -0
- data/lib/caricature/messenger.rb +57 -0
- data/lib/caricature/method_call_recorder.rb +130 -0
- data/lib/caricature/verification.rb +43 -0
- data/lib/caricature.rb +11 -0
- data/lib/core_ext/array.rb +10 -0
- data/lib/core_ext/class.rb +15 -0
- data/lib/core_ext/core_ext.rb +8 -0
- data/lib/core_ext/hash.rb +13 -0
- data/lib/core_ext/module.rb +15 -0
- data/lib/core_ext/object.rb +19 -0
- data/lib/core_ext/string.rb +17 -0
- data/lib/core_ext/system/string.rb +21 -0
- data/lib/core_ext/system/type.rb +21 -0
- data/pkg/.gitignore +0 -0
- data/pkg/caricature-0.1.0.gem +0 -0
- data/spec/bacon_helper.rb +49 -3
- data/spec/bin/.gitignore +0 -0
- data/spec/core_ext_spec.rb +9 -0
- data/spec/descriptor_spec.rb +142 -0
- data/spec/expectation_spec.rb +11 -7
- data/spec/integration_spec.rb +94 -2
- data/spec/isolation_spec.rb +0 -42
- data/spec/isolator_spec.rb +72 -66
- data/spec/messaging_spec.rb +172 -0
- data/spec/method_call_spec.rb +21 -21
- data/spec/models/ClrModels.cs +185 -0
- data/spec/verification_spec.rb +1 -1
- data/workarounds/ReflectionHelper.cs +30 -0
- metadata +133 -2
@@ -0,0 +1,424 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: Caricature::ClrIsolator</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="file-metadata">
|
26
|
+
<div id="file-list-section" class="section">
|
27
|
+
<h3 class="section-header">In Files</h3>
|
28
|
+
<div class="section-body">
|
29
|
+
<ul>
|
30
|
+
|
31
|
+
<li><a href="../lib/caricature/clr/isolator_rb.html?TB_iframe=true&height=550&width=785"
|
32
|
+
class="thickbox" title="lib/caricature/clr/isolator.rb">lib/caricature/clr/isolator.rb</a></li>
|
33
|
+
|
34
|
+
</ul>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="class-metadata">
|
42
|
+
|
43
|
+
<!-- Parent Class -->
|
44
|
+
|
45
|
+
<div id="parent-class-section" class="section">
|
46
|
+
<h3 class="section-header">Parent</h3>
|
47
|
+
|
48
|
+
<p class="link">Isolator</p>
|
49
|
+
|
50
|
+
</div>
|
51
|
+
|
52
|
+
|
53
|
+
<!-- Namespace Contents -->
|
54
|
+
|
55
|
+
|
56
|
+
<!-- Method Quickref -->
|
57
|
+
|
58
|
+
<div id="method-list-section" class="section">
|
59
|
+
<h3 class="section-header">Methods</h3>
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="#M000005">::new</a></li>
|
63
|
+
|
64
|
+
<li><a href="#M000009">#___super___</a></li>
|
65
|
+
|
66
|
+
<li><a href="#M000008">#create_isolation_for</a></li>
|
67
|
+
|
68
|
+
<li><a href="#M000006">#initialize_messenger</a></li>
|
69
|
+
|
70
|
+
</ul>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
|
74
|
+
<!-- Included Modules -->
|
75
|
+
|
76
|
+
<div id="includes-section" class="section">
|
77
|
+
<h3 class="section-header">Included Modules</h3>
|
78
|
+
<ul class="link-list">
|
79
|
+
|
80
|
+
|
81
|
+
<li><a class="include" href="Interception.html">Caricature::Interception</a></li>
|
82
|
+
|
83
|
+
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
<div id="project-metadata">
|
90
|
+
|
91
|
+
|
92
|
+
<div id="fileindex-section" class="section project-section">
|
93
|
+
<h3 class="section-header">Files</h3>
|
94
|
+
<ul>
|
95
|
+
|
96
|
+
<li class="file"><a href="../README_markdown.html">README.markdown</a></li>
|
97
|
+
|
98
|
+
</ul>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
|
102
|
+
<div id="classindex-section" class="section project-section">
|
103
|
+
<h3 class="section-header">Class Index
|
104
|
+
<span class="search-toggle"><img src="../images/find.png"
|
105
|
+
height="16" width="16" alt="[+]"
|
106
|
+
title="show/hide quicksearch" /></span></h3>
|
107
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
108
|
+
<fieldset>
|
109
|
+
<legend>Quicksearch</legend>
|
110
|
+
<input type="text" name="quicksearch" value=""
|
111
|
+
class="quicksearch-field" />
|
112
|
+
</fieldset>
|
113
|
+
</form>
|
114
|
+
|
115
|
+
<ul class="link-list">
|
116
|
+
|
117
|
+
<li><a href="../Caricature.html">Caricature</a></li>
|
118
|
+
|
119
|
+
<li><a href="../Caricature/ArgumentRecording.html">Caricature::ArgumentRecording</a></li>
|
120
|
+
|
121
|
+
<li><a href="../Caricature/ClrClassDescriptor.html">Caricature::ClrClassDescriptor</a></li>
|
122
|
+
|
123
|
+
<li><a href="../Caricature/ClrClassMessenger.html">Caricature::ClrClassMessenger</a></li>
|
124
|
+
|
125
|
+
<li><a href="../Caricature/ClrInterfaceDescriptor.html">Caricature::ClrInterfaceDescriptor</a></li>
|
126
|
+
|
127
|
+
<li><a href="../Caricature/ClrInterfaceIsolator.html">Caricature::ClrInterfaceIsolator</a></li>
|
128
|
+
|
129
|
+
<li><a href="../Caricature/ClrInterfaceMessenger.html">Caricature::ClrInterfaceMessenger</a></li>
|
130
|
+
|
131
|
+
<li><a href="../Caricature/ClrIsolator.html">Caricature::ClrIsolator</a></li>
|
132
|
+
|
133
|
+
<li><a href="../Caricature/Expectation.html">Caricature::Expectation</a></li>
|
134
|
+
|
135
|
+
<li><a href="../Caricature/ExpectationBuilder.html">Caricature::ExpectationBuilder</a></li>
|
136
|
+
|
137
|
+
<li><a href="../Caricature/ExpectationSyntax.html">Caricature::ExpectationSyntax</a></li>
|
138
|
+
|
139
|
+
<li><a href="../Caricature/Expectations.html">Caricature::Expectations</a></li>
|
140
|
+
|
141
|
+
<li><a href="../Caricature/Interception.html">Caricature::Interception</a></li>
|
142
|
+
|
143
|
+
<li><a href="../Caricature/Interception/ClassMethods.html">Caricature::Interception::ClassMethods</a></li>
|
144
|
+
|
145
|
+
<li><a href="../Caricature/Isolation.html">Caricature::Isolation</a></li>
|
146
|
+
|
147
|
+
<li><a href="../Caricature/Isolator.html">Caricature::Isolator</a></li>
|
148
|
+
|
149
|
+
<li><a href="../Caricature/MemberDescriptor.html">Caricature::MemberDescriptor</a></li>
|
150
|
+
|
151
|
+
<li><a href="../Caricature/Messenger.html">Caricature::Messenger</a></li>
|
152
|
+
|
153
|
+
<li><a href="../Caricature/MethodCallRecorder.html">Caricature::MethodCallRecorder</a></li>
|
154
|
+
|
155
|
+
<li><a href="../Caricature/MethodCallRecording.html">Caricature::MethodCallRecording</a></li>
|
156
|
+
|
157
|
+
<li><a href="../Caricature/RubyIsolator.html">Caricature::RubyIsolator</a></li>
|
158
|
+
|
159
|
+
<li><a href="../Caricature/RubyMessenger.html">Caricature::RubyMessenger</a></li>
|
160
|
+
|
161
|
+
<li><a href="../Caricature/RubyObjectDescriptor.html">Caricature::RubyObjectDescriptor</a></li>
|
162
|
+
|
163
|
+
<li><a href="../Caricature/TypeDescriptor.html">Caricature::TypeDescriptor</a></li>
|
164
|
+
|
165
|
+
<li><a href="../Caricature/Verification.html">Caricature::Verification</a></li>
|
166
|
+
|
167
|
+
<li><a href="../System.html">System</a></li>
|
168
|
+
|
169
|
+
<li><a href="../System/String.html">System::String</a></li>
|
170
|
+
|
171
|
+
<li><a href="../System/Type.html">System::Type</a></li>
|
172
|
+
|
173
|
+
<li><a href="../Array.html">Array</a></li>
|
174
|
+
|
175
|
+
<li><a href="../Class.html">Class</a></li>
|
176
|
+
|
177
|
+
<li><a href="../Hash.html">Hash</a></li>
|
178
|
+
|
179
|
+
<li><a href="../Module.html">Module</a></li>
|
180
|
+
|
181
|
+
<li><a href="../Object.html">Object</a></li>
|
182
|
+
|
183
|
+
<li><a href="../String.html">String</a></li>
|
184
|
+
|
185
|
+
</ul>
|
186
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
187
|
+
</div>
|
188
|
+
|
189
|
+
|
190
|
+
</div>
|
191
|
+
</div>
|
192
|
+
|
193
|
+
<div id="documentation">
|
194
|
+
<h1 class="class">Caricature::ClrIsolator</h1>
|
195
|
+
|
196
|
+
<div id="description">
|
197
|
+
<p>
|
198
|
+
A proxy to CLR objects that records method calls. this implements all the
|
199
|
+
public instance methods of the class when you use it in ruby code When you
|
200
|
+
use it in a CLR class you’re bound to CLR rules and it only overrides
|
201
|
+
the methods that are marked as virtual. We also can’t isolate static
|
202
|
+
or sealed types at the moment.
|
203
|
+
</p>
|
204
|
+
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<!-- Constants -->
|
208
|
+
|
209
|
+
|
210
|
+
<!-- Attributes -->
|
211
|
+
|
212
|
+
|
213
|
+
<!-- Methods -->
|
214
|
+
|
215
|
+
<div id="public-class-method-details" class="method-section section">
|
216
|
+
<h3 class="section-header">Public Class Methods</h3>
|
217
|
+
|
218
|
+
|
219
|
+
<div id="new-method" class="method-detail ">
|
220
|
+
<a name="M000005"></a>
|
221
|
+
|
222
|
+
<div class="method-heading">
|
223
|
+
|
224
|
+
<span class="method-name">new</span><span
|
225
|
+
class="method-args">(context)</span>
|
226
|
+
<span class="method-click-advice">click to toggle source</span>
|
227
|
+
|
228
|
+
</div>
|
229
|
+
|
230
|
+
<div class="method-description">
|
231
|
+
|
232
|
+
<p>
|
233
|
+
Implementation of the template method that creates an isolator for a class
|
234
|
+
defined in a CLR language.
|
235
|
+
</p>
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
<div class="method-source-code"
|
240
|
+
id="new-source">
|
241
|
+
<pre>
|
242
|
+
<span class="ruby-comment cmt"># File lib/caricature/clr/isolator.rb, line 12</span>
|
243
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">context</span>)
|
244
|
+
<span class="ruby-keyword kw">super</span>
|
245
|
+
<span class="ruby-identifier">instance</span> = <span class="ruby-keyword kw">nil</span>
|
246
|
+
<span class="ruby-identifier">sklass</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">subject</span>
|
247
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">subject</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:class_eval</span>)
|
248
|
+
<span class="ruby-identifier">sklass</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">subject</span>.<span class="ruby-identifier">class</span>
|
249
|
+
<span class="ruby-identifier">instance</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">subject</span>
|
250
|
+
<span class="ruby-keyword kw">end</span>
|
251
|
+
<span class="ruby-ivar">@descriptor</span> = <span class="ruby-constant">ClrClassDescriptor</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">sklass</span>
|
252
|
+
<span class="ruby-identifier">build_isolation</span> <span class="ruby-identifier">sklass</span>, (<span class="ruby-identifier">instance</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">sklass</span>.<span class="ruby-identifier">new</span>)
|
253
|
+
<span class="ruby-keyword kw">end</span></pre>
|
254
|
+
</div>
|
255
|
+
|
256
|
+
</div>
|
257
|
+
|
258
|
+
|
259
|
+
</div>
|
260
|
+
|
261
|
+
|
262
|
+
</div>
|
263
|
+
|
264
|
+
<div id="public-instance-method-details" class="method-section section">
|
265
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
266
|
+
|
267
|
+
|
268
|
+
<div id="-super--method" class="method-detail ">
|
269
|
+
<a name="M000009"></a>
|
270
|
+
|
271
|
+
<div class="method-heading">
|
272
|
+
|
273
|
+
<span class="method-name">___super___</span><span
|
274
|
+
class="method-args">()</span>
|
275
|
+
<span class="method-click-advice">click to toggle source</span>
|
276
|
+
|
277
|
+
</div>
|
278
|
+
|
279
|
+
<div class="method-description">
|
280
|
+
|
281
|
+
<p>
|
282
|
+
access to the proxied subject
|
283
|
+
</p>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
<div class="method-source-code"
|
288
|
+
id="-super--source">
|
289
|
+
<pre>
|
290
|
+
<span class="ruby-comment cmt"># File lib/caricature/clr/isolator.rb, line 40</span>
|
291
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">___super___</span>
|
292
|
+
<span class="ruby-identifier">isolation_context</span>.<span class="ruby-identifier">instance</span>
|
293
|
+
<span class="ruby-keyword kw">end</span></pre>
|
294
|
+
</div>
|
295
|
+
|
296
|
+
</div>
|
297
|
+
|
298
|
+
|
299
|
+
</div>
|
300
|
+
|
301
|
+
|
302
|
+
<div id="create-isolation-for-method" class="method-detail ">
|
303
|
+
<a name="M000008"></a>
|
304
|
+
|
305
|
+
<div class="method-heading">
|
306
|
+
|
307
|
+
<span class="method-name">create_isolation_for</span><span
|
308
|
+
class="method-args">(subj)</span>
|
309
|
+
<span class="method-click-advice">click to toggle source</span>
|
310
|
+
|
311
|
+
</div>
|
312
|
+
|
313
|
+
<div class="method-description">
|
314
|
+
|
315
|
+
<p>
|
316
|
+
builds the <a href="Isolator.html">Isolator</a> class for the specified
|
317
|
+
subject
|
318
|
+
</p>
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
<div class="method-source-code"
|
323
|
+
id="create-isolation-for-source">
|
324
|
+
<pre>
|
325
|
+
<span class="ruby-comment cmt"># File lib/caricature/clr/isolator.rb, line 30</span>
|
326
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_isolation_for</span>(<span class="ruby-identifier">subj</span>)
|
327
|
+
<span class="ruby-identifier">members</span> = <span class="ruby-ivar">@descriptor</span>.<span class="ruby-identifier">instance_members</span>
|
328
|
+
<span class="ruby-identifier">class_members</span> = <span class="ruby-ivar">@descriptor</span>.<span class="ruby-identifier">class_members</span>
|
329
|
+
|
330
|
+
<span class="ruby-identifier">klass</span> = <span class="ruby-constant">Object</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">class_name</span>(<span class="ruby-identifier">subj</span>), <span class="ruby-constant">Class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">subj</span>))
|
331
|
+
<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
332
|
+
|
333
|
+
<span class="ruby-identifier">include</span> <span class="ruby-constant">Interception</span>
|
334
|
+
|
335
|
+
<span class="ruby-comment cmt"># access to the proxied subject</span>
|
336
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">___super___</span>
|
337
|
+
<span class="ruby-identifier">isolation_context</span>.<span class="ruby-identifier">instance</span>
|
338
|
+
<span class="ruby-keyword kw">end</span>
|
339
|
+
|
340
|
+
<span class="ruby-identifier">members</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mem</span><span class="ruby-operator">|</span>
|
341
|
+
<span class="ruby-identifier">nm</span> = <span class="ruby-identifier">mem</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">to_sym</span>
|
342
|
+
<span class="ruby-identifier">define_method</span> <span class="ruby-identifier">nm</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
343
|
+
<span class="ruby-identifier">b</span> = <span class="ruby-keyword kw">nil</span>
|
344
|
+
<span class="ruby-identifier">b</span> = <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> { <span class="ruby-keyword kw">yield</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
345
|
+
<span class="ruby-identifier">isolation_context</span>.<span class="ruby-identifier">send_message</span>(<span class="ruby-identifier">nm</span>, <span class="ruby-identifier">mem</span>.<span class="ruby-identifier">return_type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
346
|
+
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">nm</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:to_string</span>
|
347
|
+
<span class="ruby-keyword kw">end</span>
|
348
|
+
|
349
|
+
<span class="ruby-identifier">class_members</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mn</span><span class="ruby-operator">|</span>
|
350
|
+
<span class="ruby-identifier">mn</span> = <span class="ruby-identifier">mn</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">to_sym</span>
|
351
|
+
<span class="ruby-identifier">define_cmethod</span> <span class="ruby-identifier">mn</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
352
|
+
<span class="ruby-identifier">b</span> = <span class="ruby-keyword kw">nil</span>
|
353
|
+
<span class="ruby-identifier">b</span> = <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> { <span class="ruby-keyword kw">yield</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
354
|
+
<span class="ruby-identifier">isolation_context</span>.<span class="ruby-identifier">send_message</span>(<span class="ruby-identifier">mn</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
355
|
+
<span class="ruby-keyword kw">end</span>
|
356
|
+
<span class="ruby-keyword kw">end</span>
|
357
|
+
|
358
|
+
<span class="ruby-keyword kw">end</span>
|
359
|
+
|
360
|
+
<span class="ruby-identifier">klass</span>
|
361
|
+
<span class="ruby-keyword kw">end</span></pre>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
</div>
|
365
|
+
|
366
|
+
|
367
|
+
</div>
|
368
|
+
|
369
|
+
|
370
|
+
<div id="initialize-messenger-method" class="method-detail ">
|
371
|
+
<a name="M000006"></a>
|
372
|
+
|
373
|
+
<div class="method-heading">
|
374
|
+
|
375
|
+
<span class="method-name">initialize_messenger</span><span
|
376
|
+
class="method-args">()</span>
|
377
|
+
<span class="method-click-advice">click to toggle source</span>
|
378
|
+
|
379
|
+
</div>
|
380
|
+
|
381
|
+
<div class="method-description">
|
382
|
+
|
383
|
+
<p>
|
384
|
+
initializes the messaging strategy for the isolator
|
385
|
+
</p>
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
<div class="method-source-code"
|
390
|
+
id="initialize-messenger-source">
|
391
|
+
<pre>
|
392
|
+
<span class="ruby-comment cmt"># File lib/caricature/clr/isolator.rb, line 25</span>
|
393
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize_messenger</span>
|
394
|
+
<span class="ruby-ivar">@context</span>.<span class="ruby-identifier">messenger</span> = <span class="ruby-constant">ClrClassMessenger</span>.<span class="ruby-identifier">new</span> <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">expectations</span>, <span class="ruby-ivar">@subject</span>
|
395
|
+
<span class="ruby-keyword kw">end</span></pre>
|
396
|
+
</div>
|
397
|
+
|
398
|
+
</div>
|
399
|
+
|
400
|
+
|
401
|
+
</div>
|
402
|
+
|
403
|
+
|
404
|
+
</div>
|
405
|
+
|
406
|
+
|
407
|
+
</div>
|
408
|
+
|
409
|
+
|
410
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
411
|
+
|
412
|
+
<p>Disabled; run with --debug to generate this.</p>
|
413
|
+
|
414
|
+
</div>
|
415
|
+
|
416
|
+
<div id="validator-badges">
|
417
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
418
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
419
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
420
|
+
</div>
|
421
|
+
|
422
|
+
</body>
|
423
|
+
</html>
|
424
|
+
|