caricature 0.6.3 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. data/README.rdoc +98 -0
  2. data/Rakefile +250 -47
  3. data/caricature.gemspec +79 -190
  4. data/lib/caricature/clr/descriptor.rb +14 -4
  5. data/lib/caricature/clr/isolation.rb +9 -0
  6. data/lib/caricature/clr/isolator.rb +4 -0
  7. data/lib/caricature/clr/messenger.rb +12 -17
  8. data/lib/caricature/clr.rb +1 -1
  9. data/lib/caricature/descriptor.rb +1 -1
  10. data/lib/caricature/expectation.rb +21 -11
  11. data/lib/caricature/isolation.rb +9 -3
  12. data/lib/caricature/isolator.rb +25 -9
  13. data/lib/caricature/messenger.rb +1 -1
  14. data/lib/caricature/verification.rb +2 -1
  15. data/lib/caricature/version.rb +6 -0
  16. data/lib/caricature.rb +8 -5
  17. data/spec/bacon_helper.rb +50 -30
  18. data/spec/bin/ClrModels.dll +0 -0
  19. data/spec/bin/ClrModels.dll.mdb +0 -0
  20. data/spec/integration/callback_spec.rb +157 -0
  21. data/spec/integration/ruby_to_ruby_spec.rb +12 -1
  22. data/spec/models/ClrModels.cs +8 -8
  23. data/spec/unit/expectation_spec.rb +35 -0
  24. metadata +35 -125
  25. data/.gitignore +0 -4
  26. data/README.markdown +0 -80
  27. data/VERSION +0 -1
  28. data/doc/Array.html +0 -251
  29. data/doc/Caricature/ArgumentRecording.html +0 -366
  30. data/doc/Caricature/ClrClassDescriptor.html +0 -303
  31. data/doc/Caricature/ClrClassMessenger.html +0 -263
  32. data/doc/Caricature/ClrInterfaceDescriptor.html +0 -295
  33. data/doc/Caricature/ClrInterfaceIsolator.html +0 -365
  34. data/doc/Caricature/ClrInterfaceMessenger.html +0 -260
  35. data/doc/Caricature/ClrIsolator.html +0 -425
  36. data/doc/Caricature/Expectation.html +0 -549
  37. data/doc/Caricature/ExpectationBuilder.html +0 -308
  38. data/doc/Caricature/ExpectationSyntax.html +0 -466
  39. data/doc/Caricature/Expectations.html +0 -347
  40. data/doc/Caricature/Interception/ClassMethods.html +0 -364
  41. data/doc/Caricature/Interception.html +0 -534
  42. data/doc/Caricature/Isolation.html +0 -763
  43. data/doc/Caricature/Isolator.html +0 -519
  44. data/doc/Caricature/MemberDescriptor.html +0 -335
  45. data/doc/Caricature/Messenger.html +0 -413
  46. data/doc/Caricature/MethodCallRecorder.html +0 -404
  47. data/doc/Caricature/MethodCallRecording.html +0 -493
  48. data/doc/Caricature/RubyIsolator.html +0 -416
  49. data/doc/Caricature/RubyMessenger.html +0 -261
  50. data/doc/Caricature/RubyObjectDescriptor.html +0 -289
  51. data/doc/Caricature/TypeDescriptor.html +0 -378
  52. data/doc/Caricature/Verification.html +0 -443
  53. data/doc/Caricature.html +0 -358
  54. data/doc/Class.html +0 -287
  55. data/doc/Hash.html +0 -255
  56. data/doc/Module.html +0 -287
  57. data/doc/Object.html +0 -409
  58. data/doc/README_markdown.html +0 -241
  59. data/doc/String.html +0 -369
  60. data/doc/System/String.html +0 -289
  61. data/doc/System/Type.html +0 -289
  62. data/doc/System.html +0 -207
  63. data/doc/created.rid +0 -1
  64. data/doc/images/brick.png +0 -0
  65. data/doc/images/brick_link.png +0 -0
  66. data/doc/images/bug.png +0 -0
  67. data/doc/images/bullet_black.png +0 -0
  68. data/doc/images/bullet_toggle_minus.png +0 -0
  69. data/doc/images/bullet_toggle_plus.png +0 -0
  70. data/doc/images/date.png +0 -0
  71. data/doc/images/find.png +0 -0
  72. data/doc/images/loadingAnimation.gif +0 -0
  73. data/doc/images/macFFBgHack.png +0 -0
  74. data/doc/images/package.png +0 -0
  75. data/doc/images/page_green.png +0 -0
  76. data/doc/images/page_white_text.png +0 -0
  77. data/doc/images/page_white_width.png +0 -0
  78. data/doc/images/plugin.png +0 -0
  79. data/doc/images/ruby.png +0 -0
  80. data/doc/images/tag_green.png +0 -0
  81. data/doc/images/wrench.png +0 -0
  82. data/doc/images/wrench_orange.png +0 -0
  83. data/doc/images/zoom.png +0 -0
  84. data/doc/index.html +0 -342
  85. data/doc/js/darkfish.js +0 -116
  86. data/doc/js/jquery.js +0 -32
  87. data/doc/js/quicksearch.js +0 -114
  88. data/doc/js/thickbox-compressed.js +0 -10
  89. data/doc/lib/caricature/clr/aspnet_mvc_rb.html +0 -52
  90. data/doc/lib/caricature/clr/descriptor_rb.html +0 -52
  91. data/doc/lib/caricature/clr/isolation_rb.html +0 -52
  92. data/doc/lib/caricature/clr/isolator_rb.html +0 -52
  93. data/doc/lib/caricature/clr/messenger_rb.html +0 -52
  94. data/doc/lib/caricature/clr_rb.html +0 -52
  95. data/doc/lib/caricature/descriptor_rb.html +0 -52
  96. data/doc/lib/caricature/expectation_rb.html +0 -52
  97. data/doc/lib/caricature/isolation_rb.html +0 -52
  98. data/doc/lib/caricature/isolator_rb.html +0 -52
  99. data/doc/lib/caricature/messaging_rb.html +0 -52
  100. data/doc/lib/caricature/messenger_rb.html +0 -52
  101. data/doc/lib/caricature/method_call_recorder_rb.html +0 -52
  102. data/doc/lib/caricature/verification_rb.html +0 -52
  103. data/doc/lib/caricature_rb.html +0 -52
  104. data/doc/lib/core_ext/array_rb.html +0 -52
  105. data/doc/lib/core_ext/class_rb.html +0 -52
  106. data/doc/lib/core_ext/core_ext_rb.html +0 -52
  107. data/doc/lib/core_ext/hash_rb.html +0 -52
  108. data/doc/lib/core_ext/module_rb.html +0 -52
  109. data/doc/lib/core_ext/object_rb.html +0 -52
  110. data/doc/lib/core_ext/string_rb.html +0 -52
  111. data/doc/lib/core_ext/system/string_rb.html +0 -52
  112. data/doc/lib/core_ext/system/type_rb.html +0 -52
  113. data/doc/rdoc.css +0 -696
  114. data/irb_init.rb +0 -9
  115. data/lib/bin/Workarounds.dll +0 -0
  116. data/lib/bin/Workarounds.pdb +0 -0
  117. data/pkg/.gitignore +0 -0
  118. data/pkg/caricature-0.1.0.gem +0 -0
  119. data/pkg/caricature-0.5.0.gem +0 -0
  120. data/pkg/caricature-0.6.0.gem +0 -0
  121. data/spec/bin/.gitignore +0 -0
  122. data/workarounds/ReflectionHelper.cs +0 -30
data/doc/Caricature.html DELETED
@@ -1,358 +0,0 @@
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>Module: Caricature</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="module">
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
- <li><a href="./lib/caricature/clr/isolation_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
35
- class="thickbox" title="lib/caricature/clr/isolation.rb">lib/caricature/clr/isolation.rb</a></li>
36
-
37
- <li><a href="./lib/caricature/clr/isolator_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
- class="thickbox" title="lib/caricature/clr/isolator.rb">lib/caricature/clr/isolator.rb</a></li>
39
-
40
- <li><a href="./lib/caricature/clr/messenger_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
41
- class="thickbox" title="lib/caricature/clr/messenger.rb">lib/caricature/clr/messenger.rb</a></li>
42
-
43
- <li><a href="./lib/caricature/descriptor_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
44
- class="thickbox" title="lib/caricature/descriptor.rb">lib/caricature/descriptor.rb</a></li>
45
-
46
- <li><a href="./lib/caricature/expectation_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
47
- class="thickbox" title="lib/caricature/expectation.rb">lib/caricature/expectation.rb</a></li>
48
-
49
- <li><a href="./lib/caricature/isolation_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
50
- class="thickbox" title="lib/caricature/isolation.rb">lib/caricature/isolation.rb</a></li>
51
-
52
- <li><a href="./lib/caricature/isolator_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
53
- class="thickbox" title="lib/caricature/isolator.rb">lib/caricature/isolator.rb</a></li>
54
-
55
- <li><a href="./lib/caricature/messenger_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
56
- class="thickbox" title="lib/caricature/messenger.rb">lib/caricature/messenger.rb</a></li>
57
-
58
- <li><a href="./lib/caricature/method_call_recorder_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
59
- class="thickbox" title="lib/caricature/method_call_recorder.rb">lib/caricature/method_call_recorder.rb</a></li>
60
-
61
- <li><a href="./lib/caricature/verification_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
62
- class="thickbox" title="lib/caricature/verification.rb">lib/caricature/verification.rb</a></li>
63
-
64
- </ul>
65
- </div>
66
- </div>
67
-
68
-
69
- </div>
70
-
71
- <div id="class-metadata">
72
-
73
- <!-- Parent Class -->
74
-
75
-
76
- <!-- Namespace Contents -->
77
-
78
- <div id="namespace-list-section" class="section">
79
- <h3 class="section-header">Namespace</h3>
80
- <ul class="link-list">
81
-
82
- <li><span class="type">MODULE</span> <a href="Caricature/ExpectationSyntax.html">Caricature::ExpectationSyntax</a></li>
83
-
84
- <li><span class="type">MODULE</span> <a href="Caricature/Interception.html">Caricature::Interception</a></li>
85
-
86
- <li><span class="type">CLASS</span> <a href="Caricature/ArgumentRecording.html">Caricature::ArgumentRecording</a></li>
87
-
88
- <li><span class="type">CLASS</span> <a href="Caricature/ClrClassDescriptor.html">Caricature::ClrClassDescriptor</a></li>
89
-
90
- <li><span class="type">CLASS</span> <a href="Caricature/ClrClassMessenger.html">Caricature::ClrClassMessenger</a></li>
91
-
92
- <li><span class="type">CLASS</span> <a href="Caricature/ClrInterfaceDescriptor.html">Caricature::ClrInterfaceDescriptor</a></li>
93
-
94
- <li><span class="type">CLASS</span> <a href="Caricature/ClrInterfaceIsolator.html">Caricature::ClrInterfaceIsolator</a></li>
95
-
96
- <li><span class="type">CLASS</span> <a href="Caricature/ClrInterfaceMessenger.html">Caricature::ClrInterfaceMessenger</a></li>
97
-
98
- <li><span class="type">CLASS</span> <a href="Caricature/ClrIsolator.html">Caricature::ClrIsolator</a></li>
99
-
100
- <li><span class="type">CLASS</span> <a href="Caricature/Expectation.html">Caricature::Expectation</a></li>
101
-
102
- <li><span class="type">CLASS</span> <a href="Caricature/ExpectationBuilder.html">Caricature::ExpectationBuilder</a></li>
103
-
104
- <li><span class="type">CLASS</span> <a href="Caricature/Expectations.html">Caricature::Expectations</a></li>
105
-
106
- <li><span class="type">CLASS</span> <a href="Caricature/Isolation.html">Caricature::Isolation</a></li>
107
-
108
- <li><span class="type">CLASS</span> <a href="Caricature/Isolator.html">Caricature::Isolator</a></li>
109
-
110
- <li><span class="type">CLASS</span> <a href="Caricature/MemberDescriptor.html">Caricature::MemberDescriptor</a></li>
111
-
112
- <li><span class="type">CLASS</span> <a href="Caricature/Messenger.html">Caricature::Messenger</a></li>
113
-
114
- <li><span class="type">CLASS</span> <a href="Caricature/MethodCallRecorder.html">Caricature::MethodCallRecorder</a></li>
115
-
116
- <li><span class="type">CLASS</span> <a href="Caricature/MethodCallRecording.html">Caricature::MethodCallRecording</a></li>
117
-
118
- <li><span class="type">CLASS</span> <a href="Caricature/RubyIsolator.html">Caricature::RubyIsolator</a></li>
119
-
120
- <li><span class="type">CLASS</span> <a href="Caricature/RubyMessenger.html">Caricature::RubyMessenger</a></li>
121
-
122
- <li><span class="type">CLASS</span> <a href="Caricature/RubyObjectDescriptor.html">Caricature::RubyObjectDescriptor</a></li>
123
-
124
- <li><span class="type">CLASS</span> <a href="Caricature/TypeDescriptor.html">Caricature::TypeDescriptor</a></li>
125
-
126
- <li><span class="type">CLASS</span> <a href="Caricature/Verification.html">Caricature::Verification</a></li>
127
-
128
- </ul>
129
- </div>
130
-
131
-
132
- <!-- Method Quickref -->
133
-
134
-
135
- <!-- Included Modules -->
136
-
137
- </div>
138
-
139
- <div id="project-metadata">
140
-
141
-
142
- <div id="fileindex-section" class="section project-section">
143
- <h3 class="section-header">Files</h3>
144
- <ul>
145
-
146
- <li class="file"><a href="./README_markdown.html">README.markdown</a></li>
147
-
148
- </ul>
149
- </div>
150
-
151
-
152
- <div id="classindex-section" class="section project-section">
153
- <h3 class="section-header">Class Index
154
- <span class="search-toggle"><img src="./images/find.png"
155
- height="16" width="16" alt="[+]"
156
- title="show/hide quicksearch" /></span></h3>
157
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
158
- <fieldset>
159
- <legend>Quicksearch</legend>
160
- <input type="text" name="quicksearch" value=""
161
- class="quicksearch-field" />
162
- </fieldset>
163
- </form>
164
-
165
- <ul class="link-list">
166
-
167
- <li><a href="./Caricature.html">Caricature</a></li>
168
-
169
- <li><a href="./Caricature/ArgumentRecording.html">Caricature::ArgumentRecording</a></li>
170
-
171
- <li><a href="./Caricature/ClrClassDescriptor.html">Caricature::ClrClassDescriptor</a></li>
172
-
173
- <li><a href="./Caricature/ClrClassMessenger.html">Caricature::ClrClassMessenger</a></li>
174
-
175
- <li><a href="./Caricature/ClrInterfaceDescriptor.html">Caricature::ClrInterfaceDescriptor</a></li>
176
-
177
- <li><a href="./Caricature/ClrInterfaceIsolator.html">Caricature::ClrInterfaceIsolator</a></li>
178
-
179
- <li><a href="./Caricature/ClrInterfaceMessenger.html">Caricature::ClrInterfaceMessenger</a></li>
180
-
181
- <li><a href="./Caricature/ClrIsolator.html">Caricature::ClrIsolator</a></li>
182
-
183
- <li><a href="./Caricature/Expectation.html">Caricature::Expectation</a></li>
184
-
185
- <li><a href="./Caricature/ExpectationBuilder.html">Caricature::ExpectationBuilder</a></li>
186
-
187
- <li><a href="./Caricature/ExpectationSyntax.html">Caricature::ExpectationSyntax</a></li>
188
-
189
- <li><a href="./Caricature/Expectations.html">Caricature::Expectations</a></li>
190
-
191
- <li><a href="./Caricature/Interception.html">Caricature::Interception</a></li>
192
-
193
- <li><a href="./Caricature/Interception/ClassMethods.html">Caricature::Interception::ClassMethods</a></li>
194
-
195
- <li><a href="./Caricature/Isolation.html">Caricature::Isolation</a></li>
196
-
197
- <li><a href="./Caricature/Isolator.html">Caricature::Isolator</a></li>
198
-
199
- <li><a href="./Caricature/MemberDescriptor.html">Caricature::MemberDescriptor</a></li>
200
-
201
- <li><a href="./Caricature/Messenger.html">Caricature::Messenger</a></li>
202
-
203
- <li><a href="./Caricature/MethodCallRecorder.html">Caricature::MethodCallRecorder</a></li>
204
-
205
- <li><a href="./Caricature/MethodCallRecording.html">Caricature::MethodCallRecording</a></li>
206
-
207
- <li><a href="./Caricature/RubyIsolator.html">Caricature::RubyIsolator</a></li>
208
-
209
- <li><a href="./Caricature/RubyMessenger.html">Caricature::RubyMessenger</a></li>
210
-
211
- <li><a href="./Caricature/RubyObjectDescriptor.html">Caricature::RubyObjectDescriptor</a></li>
212
-
213
- <li><a href="./Caricature/TypeDescriptor.html">Caricature::TypeDescriptor</a></li>
214
-
215
- <li><a href="./Caricature/Verification.html">Caricature::Verification</a></li>
216
-
217
- <li><a href="./System.html">System</a></li>
218
-
219
- <li><a href="./System/String.html">System::String</a></li>
220
-
221
- <li><a href="./System/Type.html">System::Type</a></li>
222
-
223
- <li><a href="./Array.html">Array</a></li>
224
-
225
- <li><a href="./Class.html">Class</a></li>
226
-
227
- <li><a href="./Hash.html">Hash</a></li>
228
-
229
- <li><a href="./Module.html">Module</a></li>
230
-
231
- <li><a href="./Object.html">Object</a></li>
232
-
233
- <li><a href="./String.html">String</a></li>
234
-
235
- </ul>
236
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
237
- </div>
238
-
239
-
240
- </div>
241
- </div>
242
-
243
- <div id="documentation">
244
- <h1 class="module">Caricature</h1>
245
-
246
- <div id="description">
247
- <p>
248
- <a href="Caricature.html">Caricature</a> - Bringing simple mocking to the
249
- DLR
250
- </p>
251
- <h6>=========================================</h6>
252
- <p>
253
- This project aims to make interop between IronRuby objects and .NET objects
254
- easier. The idea is that it integrates nicely with bacon and later rspec
255
- and that it transparently lets you mock ironruby ojbects as well as CLR
256
- objects/interfaces. <a href="Caricature.html">Caricature</a> handles
257
- interfaces, interface inheritance, CLR objects, CLR object instances, Ruby
258
- classes and instances of Ruby classes.
259
- </p>
260
- <p>
261
- From the start I wanted to do away with names like mock, stub, record,
262
- replay, verify etc. Instead I took the advice from Roy Osherhove and went
263
- with a name of <a href="Caricature/Isolation.html">Isolation</a> for
264
- creating a mock.
265
- </p>
266
- <p>
267
- An <a href="Caricature/Isolation.html">Isolation</a> will create what in
268
- Rhino.Mocks would be called a DynamicMock (but can be a partial too) :) In
269
- Moq it would be the Loose mocking strategy.
270
- </p>
271
- <p>
272
- The naming of the methods for creating mocks is the one that JP Boodhoo
273
- proposed WhenToldTo and WasToldTo. To specify a stub/expectation on an
274
- isolation you have one and only one way of doing that with the method
275
- called when_receiving. Then only if you&#8217;re interested in asserting if
276
- a method has been called you can use the did_receive? method for this.
277
- </p>
278
- <pre>
279
- isolation = Isolation.for(Ninja)
280
- isolation.when_receiving(:attack) do |exp|
281
- exp.with(:shuriken)
282
- exp.return(3)
283
- end
284
-
285
- Battle.new(mock)
286
- battle.combat
287
-
288
- isolation.did_receive?(:attack).should.be.true?
289
- </pre>
290
- <p>
291
- It may be very important to note that when you&#8217;re going to be
292
- isolating CLR classes to be used in other CLR classes you still need to
293
- obide by the CLR rules. That means if you want to redefine a method
294
- you&#8217;ll need to make sure it&#8217;s marked as virtual. Static types
295
- are still governed by static type rules. I&#8217;m working on a solution
296
- around those problems but for the time being this is how it has to be.
297
- </p>
298
-
299
- </div>
300
-
301
- <!-- Constants -->
302
-
303
- <div id="constants-list" class="section">
304
- <h3 class="section-header">Constants</h3>
305
- <dl>
306
-
307
- <dt><a name="IsolatorContext">IsolatorContext</a></dt>
308
-
309
- <dd class="description"><p>
310
- The context for an isolator. This contains the <tt>subject</tt>,
311
- <tt>recorder</tt>, <tt>expectations</tt> and <tt>messenger</tt>
312
- </p></dd>
313
-
314
-
315
- <dt><a name="Mock">Mock</a></dt>
316
-
317
- <dd class="description"><p>
318
- <tt>Mock</tt> is a synonym for <tt>Isolation</tt> so you can still use it
319
- if you&#8217;re that way inclined
320
- </p></dd>
321
-
322
-
323
- <dt><a name="Stub">Stub</a></dt>
324
-
325
- <dd class="description"><p>
326
- <tt>Stub</tt> is a synonym for <tt>Isolation</tt> so you can still use it
327
- if you&#8217;re that way inclined
328
- </p></dd>
329
-
330
-
331
- </dl>
332
- </div>
333
-
334
-
335
- <!-- Attributes -->
336
-
337
-
338
- <!-- Methods -->
339
-
340
-
341
- </div>
342
-
343
-
344
- <div id="rdoc-debugging-section-dump" class="debugging-section">
345
-
346
- <p>Disabled; run with --debug to generate this.</p>
347
-
348
- </div>
349
-
350
- <div id="validator-badges">
351
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
352
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
353
- Rdoc Generator</a> 1.1.6</small>.</p>
354
- </div>
355
-
356
- </body>
357
- </html>
358
-
data/doc/Class.html DELETED
@@ -1,287 +0,0 @@
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: Class</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/core_ext/class_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
- class="thickbox" title="lib/core_ext/class.rb">lib/core_ext/class.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="#M000096">#demodulize</a></li>
63
-
64
- <li><a href="#M000097">#is_clr_type?</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">Class</h1>
180
-
181
- <div id="description">
182
-
183
- </div>
184
-
185
- <!-- Constants -->
186
-
187
-
188
- <!-- Attributes -->
189
-
190
-
191
- <!-- Methods -->
192
-
193
- <div id="public-instance-method-details" class="method-section section">
194
- <h3 class="section-header">Public Instance Methods</h3>
195
-
196
-
197
- <div id="demodulize-method" class="method-detail ">
198
- <a name="M000096"></a>
199
-
200
- <div class="method-heading">
201
-
202
- <span class="method-name">demodulize</span><span
203
- class="method-args">()</span>
204
- <span class="method-click-advice">click to toggle source</span>
205
-
206
- </div>
207
-
208
- <div class="method-description">
209
-
210
- <p>
211
- removes all the modules from this class name
212
- </p>
213
-
214
-
215
-
216
- <div class="method-source-code"
217
- id="demodulize-source">
218
- <pre>
219
- <span class="ruby-comment cmt"># File lib/core_ext/class.rb, line 4</span>
220
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">demodulize</span>
221
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^.*::/</span>, <span class="ruby-value str">''</span>)
222
- <span class="ruby-keyword kw">end</span></pre>
223
- </div>
224
-
225
- </div>
226
-
227
-
228
- </div>
229
-
230
-
231
- <div id="is-clr-type--method" class="method-detail ">
232
- <a name="M000097"></a>
233
-
234
- <div class="method-heading">
235
-
236
- <span class="method-name">is_clr_type?</span><span
237
- class="method-args">()</span>
238
- <span class="method-click-advice">click to toggle source</span>
239
-
240
- </div>
241
-
242
- <div class="method-description">
243
-
244
- <p>
245
- indicates whether this type has a CLR type in its ancestors
246
- </p>
247
-
248
-
249
-
250
- <div class="method-source-code"
251
- id="is-clr-type--source">
252
- <pre>
253
- <span class="ruby-comment cmt"># File lib/core_ext/class.rb, line 9</span>
254
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_clr_type?</span>
255
- <span class="ruby-operator">!</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_clr_type</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span>
256
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included_modules</span>.<span class="ruby-identifier">any?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">mod</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span><span class="ruby-identifier">mod</span>.<span class="ruby-identifier">to_clr_type</span>.<span class="ruby-identifier">nil?</span> } <span class="ruby-operator">||</span>
257
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">mod</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mod</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Object</span> }.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mod</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span><span class="ruby-identifier">mod</span>.<span class="ruby-identifier">to_clr_type</span>.<span class="ruby-identifier">nil?</span> }
258
- <span class="ruby-keyword kw">end</span></pre>
259
- </div>
260
-
261
- </div>
262
-
263
-
264
- </div>
265
-
266
-
267
- </div>
268
-
269
-
270
- </div>
271
-
272
-
273
- <div id="rdoc-debugging-section-dump" class="debugging-section">
274
-
275
- <p>Disabled; run with --debug to generate this.</p>
276
-
277
- </div>
278
-
279
- <div id="validator-badges">
280
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
281
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
282
- Rdoc Generator</a> 1.1.6</small>.</p>
283
- </div>
284
-
285
- </body>
286
- </html>
287
-