caricature 0.3.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. data/.gitignore +4 -0
  2. data/Rakefile +100 -0
  3. data/VERSION +1 -0
  4. data/caricature.gemspec +177 -0
  5. data/doc/Array.html +251 -0
  6. data/doc/Caricature/ArgumentRecording.html +366 -0
  7. data/doc/Caricature/ClrClassDescriptor.html +303 -0
  8. data/doc/Caricature/ClrClassMessenger.html +263 -0
  9. data/doc/Caricature/ClrInterfaceDescriptor.html +295 -0
  10. data/doc/Caricature/ClrInterfaceIsolator.html +365 -0
  11. data/doc/Caricature/ClrInterfaceMessenger.html +260 -0
  12. data/doc/Caricature/ClrIsolator.html +424 -0
  13. data/doc/Caricature/Expectation.html +549 -0
  14. data/doc/Caricature/ExpectationBuilder.html +308 -0
  15. data/doc/Caricature/ExpectationSyntax.html +438 -0
  16. data/doc/Caricature/Expectations.html +344 -0
  17. data/doc/Caricature/Interception/ClassMethods.html +246 -0
  18. data/doc/Caricature/Interception.html +416 -0
  19. data/doc/Caricature/Isolation.html +578 -0
  20. data/doc/Caricature/Isolator.html +519 -0
  21. data/doc/Caricature/MemberDescriptor.html +335 -0
  22. data/doc/Caricature/Messenger.html +335 -0
  23. data/doc/Caricature/MethodCallRecorder.html +440 -0
  24. data/doc/Caricature/MethodCallRecording.html +493 -0
  25. data/doc/Caricature/RubyIsolator.html +416 -0
  26. data/doc/Caricature/RubyMessenger.html +260 -0
  27. data/doc/Caricature/RubyObjectDescriptor.html +289 -0
  28. data/doc/Caricature/TypeDescriptor.html +378 -0
  29. data/doc/Caricature/Verification.html +443 -0
  30. data/doc/Caricature.html +358 -0
  31. data/doc/Class.html +287 -0
  32. data/doc/Hash.html +255 -0
  33. data/doc/Module.html +287 -0
  34. data/doc/Object.html +322 -0
  35. data/doc/README_markdown.html +241 -0
  36. data/doc/String.html +289 -0
  37. data/doc/System/String.html +289 -0
  38. data/doc/System/Type.html +289 -0
  39. data/doc/System.html +207 -0
  40. data/doc/created.rid +1 -0
  41. data/doc/images/brick.png +0 -0
  42. data/doc/images/brick_link.png +0 -0
  43. data/doc/images/bug.png +0 -0
  44. data/doc/images/bullet_black.png +0 -0
  45. data/doc/images/bullet_toggle_minus.png +0 -0
  46. data/doc/images/bullet_toggle_plus.png +0 -0
  47. data/doc/images/date.png +0 -0
  48. data/doc/images/find.png +0 -0
  49. data/doc/images/loadingAnimation.gif +0 -0
  50. data/doc/images/macFFBgHack.png +0 -0
  51. data/doc/images/package.png +0 -0
  52. data/doc/images/page_green.png +0 -0
  53. data/doc/images/page_white_text.png +0 -0
  54. data/doc/images/page_white_width.png +0 -0
  55. data/doc/images/plugin.png +0 -0
  56. data/doc/images/ruby.png +0 -0
  57. data/doc/images/tag_green.png +0 -0
  58. data/doc/images/wrench.png +0 -0
  59. data/doc/images/wrench_orange.png +0 -0
  60. data/doc/images/zoom.png +0 -0
  61. data/doc/index.html +312 -0
  62. data/doc/js/darkfish.js +116 -0
  63. data/doc/js/jquery.js +32 -0
  64. data/doc/js/quicksearch.js +114 -0
  65. data/doc/js/thickbox-compressed.js +10 -0
  66. data/doc/lib/caricature/clr/descriptor_rb.html +52 -0
  67. data/doc/lib/caricature/clr/isolation_rb.html +52 -0
  68. data/doc/lib/caricature/clr/isolator_rb.html +52 -0
  69. data/doc/lib/caricature/clr/messenger_rb.html +52 -0
  70. data/doc/lib/caricature/clr_rb.html +52 -0
  71. data/doc/lib/caricature/descriptor_rb.html +52 -0
  72. data/doc/lib/caricature/expectation_rb.html +52 -0
  73. data/doc/lib/caricature/isolation_rb.html +52 -0
  74. data/doc/lib/caricature/isolator_rb.html +52 -0
  75. data/doc/lib/caricature/messaging_rb.html +52 -0
  76. data/doc/lib/caricature/method_call_recorder_rb.html +52 -0
  77. data/doc/lib/caricature/verification_rb.html +52 -0
  78. data/doc/lib/caricature_rb.html +52 -0
  79. data/doc/lib/core_ext/array_rb.html +52 -0
  80. data/doc/lib/core_ext/class_rb.html +52 -0
  81. data/doc/lib/core_ext/core_ext_rb.html +52 -0
  82. data/doc/lib/core_ext/hash_rb.html +52 -0
  83. data/doc/lib/core_ext/module_rb.html +52 -0
  84. data/doc/lib/core_ext/object_rb.html +52 -0
  85. data/doc/lib/core_ext/string_rb.html +52 -0
  86. data/doc/lib/core_ext/system/string_rb.html +52 -0
  87. data/doc/lib/core_ext/system/type_rb.html +52 -0
  88. data/doc/rdoc.css +696 -0
  89. data/irb_init.rb +9 -0
  90. data/lib/bin/Workarounds.dll +0 -0
  91. data/lib/bin/Workarounds.pdb +0 -0
  92. data/lib/caricature/clr/descriptor.rb +55 -0
  93. data/lib/caricature/clr/isolation.rb +33 -0
  94. data/lib/caricature/clr/isolator.rb +112 -0
  95. data/lib/caricature/clr/messenger.rb +46 -0
  96. data/lib/caricature/clr.rb +6 -0
  97. data/lib/caricature/descriptor.rb +74 -0
  98. data/lib/caricature/expectation.rb +159 -0
  99. data/lib/caricature/isolation.rb +146 -0
  100. data/lib/caricature/isolator.rb +287 -0
  101. data/lib/caricature/messenger.rb +57 -0
  102. data/lib/caricature/method_call_recorder.rb +130 -0
  103. data/lib/caricature/verification.rb +43 -0
  104. data/lib/caricature.rb +11 -0
  105. data/lib/core_ext/array.rb +10 -0
  106. data/lib/core_ext/class.rb +15 -0
  107. data/lib/core_ext/core_ext.rb +8 -0
  108. data/lib/core_ext/hash.rb +13 -0
  109. data/lib/core_ext/module.rb +15 -0
  110. data/lib/core_ext/object.rb +19 -0
  111. data/lib/core_ext/string.rb +17 -0
  112. data/lib/core_ext/system/string.rb +21 -0
  113. data/lib/core_ext/system/type.rb +21 -0
  114. data/pkg/.gitignore +0 -0
  115. data/pkg/caricature-0.1.0.gem +0 -0
  116. data/spec/bacon_helper.rb +49 -3
  117. data/spec/bin/.gitignore +0 -0
  118. data/spec/core_ext_spec.rb +9 -0
  119. data/spec/descriptor_spec.rb +142 -0
  120. data/spec/expectation_spec.rb +11 -7
  121. data/spec/integration_spec.rb +94 -2
  122. data/spec/isolation_spec.rb +0 -42
  123. data/spec/isolator_spec.rb +72 -66
  124. data/spec/messaging_spec.rb +172 -0
  125. data/spec/method_call_spec.rb +21 -21
  126. data/spec/models/ClrModels.cs +185 -0
  127. data/spec/verification_spec.rb +1 -1
  128. data/workarounds/ReflectionHelper.cs +30 -0
  129. metadata +133 -2
@@ -0,0 +1,366 @@
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::ArgumentRecording</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/method_call_recorder_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
+ class="thickbox" title="lib/caricature/method_call_recorder.rb">lib/caricature/method_call_recorder.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"><a href="../Object.html">Object</a></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="#M000057">::new</a></li>
63
+
64
+ <li><a href="#M000058">#==</a></li>
65
+
66
+ </ul>
67
+ </div>
68
+
69
+
70
+ <!-- Included Modules -->
71
+
72
+ </div>
73
+
74
+ <div id="project-metadata">
75
+
76
+
77
+ <div id="fileindex-section" class="section project-section">
78
+ <h3 class="section-header">Files</h3>
79
+ <ul>
80
+
81
+ <li class="file"><a href="../README_markdown.html">README.markdown</a></li>
82
+
83
+ </ul>
84
+ </div>
85
+
86
+
87
+ <div id="classindex-section" class="section project-section">
88
+ <h3 class="section-header">Class Index
89
+ <span class="search-toggle"><img src="../images/find.png"
90
+ height="16" width="16" alt="[+]"
91
+ title="show/hide quicksearch" /></span></h3>
92
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
93
+ <fieldset>
94
+ <legend>Quicksearch</legend>
95
+ <input type="text" name="quicksearch" value=""
96
+ class="quicksearch-field" />
97
+ </fieldset>
98
+ </form>
99
+
100
+ <ul class="link-list">
101
+
102
+ <li><a href="../Caricature.html">Caricature</a></li>
103
+
104
+ <li><a href="../Caricature/ArgumentRecording.html">Caricature::ArgumentRecording</a></li>
105
+
106
+ <li><a href="../Caricature/ClrClassDescriptor.html">Caricature::ClrClassDescriptor</a></li>
107
+
108
+ <li><a href="../Caricature/ClrClassMessenger.html">Caricature::ClrClassMessenger</a></li>
109
+
110
+ <li><a href="../Caricature/ClrInterfaceDescriptor.html">Caricature::ClrInterfaceDescriptor</a></li>
111
+
112
+ <li><a href="../Caricature/ClrInterfaceIsolator.html">Caricature::ClrInterfaceIsolator</a></li>
113
+
114
+ <li><a href="../Caricature/ClrInterfaceMessenger.html">Caricature::ClrInterfaceMessenger</a></li>
115
+
116
+ <li><a href="../Caricature/ClrIsolator.html">Caricature::ClrIsolator</a></li>
117
+
118
+ <li><a href="../Caricature/Expectation.html">Caricature::Expectation</a></li>
119
+
120
+ <li><a href="../Caricature/ExpectationBuilder.html">Caricature::ExpectationBuilder</a></li>
121
+
122
+ <li><a href="../Caricature/ExpectationSyntax.html">Caricature::ExpectationSyntax</a></li>
123
+
124
+ <li><a href="../Caricature/Expectations.html">Caricature::Expectations</a></li>
125
+
126
+ <li><a href="../Caricature/Interception.html">Caricature::Interception</a></li>
127
+
128
+ <li><a href="../Caricature/Interception/ClassMethods.html">Caricature::Interception::ClassMethods</a></li>
129
+
130
+ <li><a href="../Caricature/Isolation.html">Caricature::Isolation</a></li>
131
+
132
+ <li><a href="../Caricature/Isolator.html">Caricature::Isolator</a></li>
133
+
134
+ <li><a href="../Caricature/MemberDescriptor.html">Caricature::MemberDescriptor</a></li>
135
+
136
+ <li><a href="../Caricature/Messenger.html">Caricature::Messenger</a></li>
137
+
138
+ <li><a href="../Caricature/MethodCallRecorder.html">Caricature::MethodCallRecorder</a></li>
139
+
140
+ <li><a href="../Caricature/MethodCallRecording.html">Caricature::MethodCallRecording</a></li>
141
+
142
+ <li><a href="../Caricature/RubyIsolator.html">Caricature::RubyIsolator</a></li>
143
+
144
+ <li><a href="../Caricature/RubyMessenger.html">Caricature::RubyMessenger</a></li>
145
+
146
+ <li><a href="../Caricature/RubyObjectDescriptor.html">Caricature::RubyObjectDescriptor</a></li>
147
+
148
+ <li><a href="../Caricature/TypeDescriptor.html">Caricature::TypeDescriptor</a></li>
149
+
150
+ <li><a href="../Caricature/Verification.html">Caricature::Verification</a></li>
151
+
152
+ <li><a href="../System.html">System</a></li>
153
+
154
+ <li><a href="../System/String.html">System::String</a></li>
155
+
156
+ <li><a href="../System/Type.html">System::Type</a></li>
157
+
158
+ <li><a href="../Array.html">Array</a></li>
159
+
160
+ <li><a href="../Class.html">Class</a></li>
161
+
162
+ <li><a href="../Hash.html">Hash</a></li>
163
+
164
+ <li><a href="../Module.html">Module</a></li>
165
+
166
+ <li><a href="../Object.html">Object</a></li>
167
+
168
+ <li><a href="../String.html">String</a></li>
169
+
170
+ </ul>
171
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
172
+ </div>
173
+
174
+
175
+ </div>
176
+ </div>
177
+
178
+ <div id="documentation">
179
+ <h1 class="class">Caricature::ArgumentRecording</h1>
180
+
181
+ <div id="description">
182
+ <p>
183
+ A recording of an argument variation. Every time a method is called with
184
+ different arguments the method call recorder will create an
185
+ ArgumentVariation these variations are used later in the assertion to
186
+ verify against specific argument values
187
+ </p>
188
+
189
+ </div>
190
+
191
+ <!-- Constants -->
192
+
193
+
194
+ <!-- Attributes -->
195
+
196
+ <div id="attribute-method-details" class="method-section section">
197
+ <h3 class="section-header">Attributes</h3>
198
+
199
+
200
+ <div id="args-attribute-method" class="method-detail">
201
+ <a name="args"></a>
202
+
203
+ <a name="args="></a>
204
+
205
+ <div class="method-heading attribute-method-heading">
206
+ <span class="method-name">args</span><span
207
+ class="attribute-access-type">[RW]</span>
208
+ </div>
209
+
210
+ <div class="method-description">
211
+
212
+ <p>
213
+ contains the arguments of the recorded parameters
214
+ </p>
215
+
216
+ </div>
217
+ </div>
218
+
219
+ <div id="block-attribute-method" class="method-detail">
220
+ <a name="block"></a>
221
+
222
+ <a name="block="></a>
223
+
224
+ <div class="method-heading attribute-method-heading">
225
+ <span class="method-name">block</span><span
226
+ class="attribute-access-type">[RW]</span>
227
+ </div>
228
+
229
+ <div class="method-description">
230
+
231
+ <p>
232
+ contains the block for the recorded parameters
233
+ </p>
234
+
235
+ </div>
236
+ </div>
237
+
238
+ <div id="call-number-attribute-method" class="method-detail">
239
+ <a name="call_number"></a>
240
+
241
+ <a name="call_number="></a>
242
+
243
+ <div class="method-heading attribute-method-heading">
244
+ <span class="method-name">call_number</span><span
245
+ class="attribute-access-type">[RW]</span>
246
+ </div>
247
+
248
+ <div class="method-description">
249
+
250
+ <p>
251
+ the number of the call that has the following parameters
252
+ </p>
253
+
254
+ </div>
255
+ </div>
256
+
257
+ </div>
258
+
259
+
260
+ <!-- Methods -->
261
+
262
+ <div id="public-class-method-details" class="method-section section">
263
+ <h3 class="section-header">Public Class Methods</h3>
264
+
265
+
266
+ <div id="new-method" class="method-detail ">
267
+ <a name="M000057"></a>
268
+
269
+ <div class="method-heading">
270
+
271
+ <span class="method-name">new</span><span
272
+ class="method-args">(args=[], call_number=1, block=nil)</span>
273
+ <span class="method-click-advice">click to toggle source</span>
274
+
275
+ </div>
276
+
277
+ <div class="method-description">
278
+
279
+ <p>
280
+ initializes a new instance of an argument recording. configures it with 1
281
+ call count and the args as an <tt>Array</tt>
282
+ </p>
283
+
284
+
285
+
286
+ <div class="method-source-code"
287
+ id="new-source">
288
+ <pre>
289
+ <span class="ruby-comment cmt"># File lib/caricature/method_call_recorder.rb, line 21</span>
290
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>=[], <span class="ruby-identifier">call_number</span>=<span class="ruby-value">1</span>, <span class="ruby-identifier">block</span>=<span class="ruby-keyword kw">nil</span>)
291
+ <span class="ruby-ivar">@args</span> = <span class="ruby-identifier">args</span>
292
+ <span class="ruby-ivar">@block</span> = <span class="ruby-identifier">block</span>
293
+ <span class="ruby-ivar">@call_number</span> = <span class="ruby-identifier">call_number</span>
294
+ <span class="ruby-keyword kw">end</span></pre>
295
+ </div>
296
+
297
+ </div>
298
+
299
+
300
+ </div>
301
+
302
+
303
+ </div>
304
+
305
+ <div id="public-instance-method-details" class="method-section section">
306
+ <h3 class="section-header">Public Instance Methods</h3>
307
+
308
+
309
+ <div id="--method" class="method-detail ">
310
+ <a name="M000058"></a>
311
+
312
+ <div class="method-heading">
313
+
314
+ <span class="method-name">==</span><span
315
+ class="method-args">(other)</span>
316
+ <span class="method-click-advice">click to toggle source</span>
317
+
318
+ </div>
319
+
320
+ <div class="method-description">
321
+
322
+ <p>
323
+ compares one argument variation to another. Also takes an array as an
324
+ argument
325
+ </p>
326
+
327
+
328
+
329
+ <div class="method-source-code"
330
+ id="--source">
331
+ <pre>
332
+ <span class="ruby-comment cmt"># File lib/caricature/method_call_recorder.rb, line 29</span>
333
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
334
+ <span class="ruby-identifier">other</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">other</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:each</span>)
335
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:any</span>
336
+ <span class="ruby-identifier">other</span>.<span class="ruby-identifier">args</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">args</span>
337
+ <span class="ruby-keyword kw">end</span></pre>
338
+ </div>
339
+
340
+ </div>
341
+
342
+
343
+ </div>
344
+
345
+
346
+ </div>
347
+
348
+
349
+ </div>
350
+
351
+
352
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
353
+
354
+ <p>Disabled; run with --debug to generate this.</p>
355
+
356
+ </div>
357
+
358
+ <div id="validator-badges">
359
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
360
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
361
+ Rdoc Generator</a> 1.1.6</small>.</p>
362
+ </div>
363
+
364
+ </body>
365
+ </html>
366
+
@@ -0,0 +1,303 @@
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::ClrClassDescriptor</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/descriptor_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
+ class="thickbox" title="lib/caricature/clr/descriptor.rb">lib/caricature/clr/descriptor.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">TypeDescriptor</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="#M000007">#initialize_class_members_for</a></li>
63
+
64
+ <li><a href="#M000004">#initialize_instance_members_for</a></li>
65
+
66
+ </ul>
67
+ </div>
68
+
69
+
70
+ <!-- Included Modules -->
71
+
72
+ </div>
73
+
74
+ <div id="project-metadata">
75
+
76
+
77
+ <div id="fileindex-section" class="section project-section">
78
+ <h3 class="section-header">Files</h3>
79
+ <ul>
80
+
81
+ <li class="file"><a href="../README_markdown.html">README.markdown</a></li>
82
+
83
+ </ul>
84
+ </div>
85
+
86
+
87
+ <div id="classindex-section" class="section project-section">
88
+ <h3 class="section-header">Class Index
89
+ <span class="search-toggle"><img src="../images/find.png"
90
+ height="16" width="16" alt="[+]"
91
+ title="show/hide quicksearch" /></span></h3>
92
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
93
+ <fieldset>
94
+ <legend>Quicksearch</legend>
95
+ <input type="text" name="quicksearch" value=""
96
+ class="quicksearch-field" />
97
+ </fieldset>
98
+ </form>
99
+
100
+ <ul class="link-list">
101
+
102
+ <li><a href="../Caricature.html">Caricature</a></li>
103
+
104
+ <li><a href="../Caricature/ArgumentRecording.html">Caricature::ArgumentRecording</a></li>
105
+
106
+ <li><a href="../Caricature/ClrClassDescriptor.html">Caricature::ClrClassDescriptor</a></li>
107
+
108
+ <li><a href="../Caricature/ClrClassMessenger.html">Caricature::ClrClassMessenger</a></li>
109
+
110
+ <li><a href="../Caricature/ClrInterfaceDescriptor.html">Caricature::ClrInterfaceDescriptor</a></li>
111
+
112
+ <li><a href="../Caricature/ClrInterfaceIsolator.html">Caricature::ClrInterfaceIsolator</a></li>
113
+
114
+ <li><a href="../Caricature/ClrInterfaceMessenger.html">Caricature::ClrInterfaceMessenger</a></li>
115
+
116
+ <li><a href="../Caricature/ClrIsolator.html">Caricature::ClrIsolator</a></li>
117
+
118
+ <li><a href="../Caricature/Expectation.html">Caricature::Expectation</a></li>
119
+
120
+ <li><a href="../Caricature/ExpectationBuilder.html">Caricature::ExpectationBuilder</a></li>
121
+
122
+ <li><a href="../Caricature/ExpectationSyntax.html">Caricature::ExpectationSyntax</a></li>
123
+
124
+ <li><a href="../Caricature/Expectations.html">Caricature::Expectations</a></li>
125
+
126
+ <li><a href="../Caricature/Interception.html">Caricature::Interception</a></li>
127
+
128
+ <li><a href="../Caricature/Interception/ClassMethods.html">Caricature::Interception::ClassMethods</a></li>
129
+
130
+ <li><a href="../Caricature/Isolation.html">Caricature::Isolation</a></li>
131
+
132
+ <li><a href="../Caricature/Isolator.html">Caricature::Isolator</a></li>
133
+
134
+ <li><a href="../Caricature/MemberDescriptor.html">Caricature::MemberDescriptor</a></li>
135
+
136
+ <li><a href="../Caricature/Messenger.html">Caricature::Messenger</a></li>
137
+
138
+ <li><a href="../Caricature/MethodCallRecorder.html">Caricature::MethodCallRecorder</a></li>
139
+
140
+ <li><a href="../Caricature/MethodCallRecording.html">Caricature::MethodCallRecording</a></li>
141
+
142
+ <li><a href="../Caricature/RubyIsolator.html">Caricature::RubyIsolator</a></li>
143
+
144
+ <li><a href="../Caricature/RubyMessenger.html">Caricature::RubyMessenger</a></li>
145
+
146
+ <li><a href="../Caricature/RubyObjectDescriptor.html">Caricature::RubyObjectDescriptor</a></li>
147
+
148
+ <li><a href="../Caricature/TypeDescriptor.html">Caricature::TypeDescriptor</a></li>
149
+
150
+ <li><a href="../Caricature/Verification.html">Caricature::Verification</a></li>
151
+
152
+ <li><a href="../System.html">System</a></li>
153
+
154
+ <li><a href="../System/String.html">System::String</a></li>
155
+
156
+ <li><a href="../System/Type.html">System::Type</a></li>
157
+
158
+ <li><a href="../Array.html">Array</a></li>
159
+
160
+ <li><a href="../Class.html">Class</a></li>
161
+
162
+ <li><a href="../Hash.html">Hash</a></li>
163
+
164
+ <li><a href="../Module.html">Module</a></li>
165
+
166
+ <li><a href="../Object.html">Object</a></li>
167
+
168
+ <li><a href="../String.html">String</a></li>
169
+
170
+ </ul>
171
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
172
+ </div>
173
+
174
+
175
+ </div>
176
+ </div>
177
+
178
+ <div id="documentation">
179
+ <h1 class="class">Caricature::ClrClassDescriptor</h1>
180
+
181
+ <div id="description">
182
+ <p>
183
+ Describes a CLR class type. it collects the properties and methods on an
184
+ instance as well as on a static level
185
+ </p>
186
+
187
+ </div>
188
+
189
+ <!-- Constants -->
190
+
191
+
192
+ <!-- Attributes -->
193
+
194
+
195
+ <!-- Methods -->
196
+
197
+ <div id="public-instance-method-details" class="method-section section">
198
+ <h3 class="section-header">Public Instance Methods</h3>
199
+
200
+
201
+ <div id="initialize-class-members-for-method" class="method-detail ">
202
+ <a name="M000007"></a>
203
+
204
+ <div class="method-heading">
205
+
206
+ <span class="method-name">initialize_class_members_for</span><span
207
+ class="method-args">(klass)</span>
208
+ <span class="method-click-advice">click to toggle source</span>
209
+
210
+ </div>
211
+
212
+ <div class="method-description">
213
+
214
+ <p>
215
+ collects all the static members of the provided CLR class type
216
+ </p>
217
+
218
+
219
+
220
+ <div class="method-source-code"
221
+ id="initialize-class-members-for-source">
222
+ <pre>
223
+ <span class="ruby-comment cmt"># File lib/caricature/clr/descriptor.rb, line 42</span>
224
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize_class_members_for</span>(<span class="ruby-identifier">klass</span>)
225
+ <span class="ruby-identifier">clr_type</span> = <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">to_clr_type</span>
226
+
227
+ <span class="ruby-identifier">methods</span> = <span class="ruby-constant">Workarounds</span><span class="ruby-operator">::</span><span class="ruby-constant">ReflectionHelper</span>.<span class="ruby-identifier">get_class_methods</span>(<span class="ruby-identifier">clr_type</span>)
228
+ <span class="ruby-identifier">properties</span> = <span class="ruby-constant">Workarounds</span><span class="ruby-operator">::</span><span class="ruby-constant">ReflectionHelper</span>.<span class="ruby-identifier">get_class_properties</span>(<span class="ruby-identifier">clr_type</span>)
229
+
230
+ <span class="ruby-ivar">@class_members</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">methods</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mi</span><span class="ruby-operator">|</span> <span class="ruby-constant">MemberDescriptor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mi</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">underscore</span>, <span class="ruby-identifier">mi</span>.<span class="ruby-identifier">return_type</span>, <span class="ruby-keyword kw">false</span>) }
231
+ <span class="ruby-ivar">@class_members</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">pi</span><span class="ruby-operator">|</span> <span class="ruby-constant">MemberDescriptor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">pi</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">underscore</span>, <span class="ruby-identifier">pi</span>.<span class="ruby-identifier">property_type</span>, <span class="ruby-keyword kw">false</span>) }
232
+ <span class="ruby-ivar">@class_members</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">pi</span><span class="ruby-operator">|</span> <span class="ruby-identifier">pi</span>.<span class="ruby-identifier">can_write</span> }.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">pi</span><span class="ruby-operator">|</span> <span class="ruby-constant">MemberDescriptor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;#{pi.name.underscore}=&quot;</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">false</span>) }
233
+ <span class="ruby-keyword kw">end</span></pre>
234
+ </div>
235
+
236
+ </div>
237
+
238
+
239
+ </div>
240
+
241
+
242
+ <div id="initialize-instance-members-for-method" class="method-detail ">
243
+ <a name="M000004"></a>
244
+
245
+ <div class="method-heading">
246
+
247
+ <span class="method-name">initialize_instance_members_for</span><span
248
+ class="method-args">(klass)</span>
249
+ <span class="method-click-advice">click to toggle source</span>
250
+
251
+ </div>
252
+
253
+ <div class="method-description">
254
+
255
+ <p>
256
+ collects all the instance members of the provided CLR class type
257
+ </p>
258
+
259
+
260
+
261
+ <div class="method-source-code"
262
+ id="initialize-instance-members-for-source">
263
+ <pre>
264
+ <span class="ruby-comment cmt"># File lib/caricature/clr/descriptor.rb, line 30</span>
265
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize_instance_members_for</span>(<span class="ruby-identifier">klass</span>)
266
+ <span class="ruby-identifier">clr_type</span> = <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">to_clr_type</span>
267
+
268
+ <span class="ruby-identifier">methods</span> = <span class="ruby-constant">Workarounds</span><span class="ruby-operator">::</span><span class="ruby-constant">ReflectionHelper</span>.<span class="ruby-identifier">get_instance_methods</span>(<span class="ruby-identifier">clr_type</span>)
269
+ <span class="ruby-identifier">properties</span> = <span class="ruby-constant">Workarounds</span><span class="ruby-operator">::</span><span class="ruby-constant">ReflectionHelper</span>.<span class="ruby-identifier">get_instance_properties</span>(<span class="ruby-identifier">clr_type</span>)
270
+
271
+ <span class="ruby-ivar">@instance_members</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">methods</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mi</span><span class="ruby-operator">|</span> <span class="ruby-constant">MemberDescriptor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mi</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">underscore</span>, <span class="ruby-identifier">mi</span>.<span class="ruby-identifier">return_type</span>) }
272
+ <span class="ruby-ivar">@instance_members</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">pi</span><span class="ruby-operator">|</span> <span class="ruby-constant">MemberDescriptor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">pi</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">underscore</span>, <span class="ruby-identifier">pi</span>.<span class="ruby-identifier">property_type</span>) }
273
+ <span class="ruby-ivar">@instance_members</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">pi</span><span class="ruby-operator">|</span> <span class="ruby-identifier">pi</span>.<span class="ruby-identifier">can_write</span> }.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">pi</span><span class="ruby-operator">|</span> <span class="ruby-constant">MemberDescriptor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;#{pi.name.underscore}=&quot;</span>, <span class="ruby-keyword kw">nil</span>) }
274
+ <span class="ruby-keyword kw">end</span></pre>
275
+ </div>
276
+
277
+ </div>
278
+
279
+
280
+ </div>
281
+
282
+
283
+ </div>
284
+
285
+
286
+ </div>
287
+
288
+
289
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
290
+
291
+ <p>Disabled; run with --debug to generate this.</p>
292
+
293
+ </div>
294
+
295
+ <div id="validator-badges">
296
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
297
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
298
+ Rdoc Generator</a> 1.1.6</small>.</p>
299
+ </div>
300
+
301
+ </body>
302
+ </html>
303
+