structured_warnings 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. data/History.txt +5 -0
  2. data/License.txt +1 -1
  3. data/README.rdoc +20 -11
  4. data/Rakefile +46 -29
  5. data/doc/DeprecatedMethodWarning.html +170 -0
  6. data/doc/DeprecatedSignatureWarning.html +171 -0
  7. data/doc/DeprecationWarning.html +171 -0
  8. data/doc/Dynamic.html +172 -0
  9. data/doc/Object.html +186 -0
  10. data/doc/README_rdoc.html +296 -0
  11. data/doc/StandardWarning.html +169 -0
  12. data/doc/StructuredWarnings.html +187 -0
  13. data/doc/StructuredWarnings/ClassMethods.html +254 -0
  14. data/doc/StructuredWarnings/Kernel.html +274 -0
  15. data/doc/StructuredWarnings/Test.html +176 -0
  16. data/doc/StructuredWarnings/Test/Assertions.html +322 -0
  17. data/doc/StructuredWarnings/Test/Warner.html +271 -0
  18. data/doc/StructuredWarnings/Warner.html +226 -0
  19. data/doc/Warning.html +460 -0
  20. data/doc/Warning/ClassMethods.html +334 -0
  21. data/doc/created.rid +10 -0
  22. data/doc/images/brick.png +0 -0
  23. data/doc/images/brick_link.png +0 -0
  24. data/doc/images/bug.png +0 -0
  25. data/doc/images/bullet_black.png +0 -0
  26. data/doc/images/bullet_toggle_minus.png +0 -0
  27. data/doc/images/bullet_toggle_plus.png +0 -0
  28. data/doc/images/date.png +0 -0
  29. data/doc/images/find.png +0 -0
  30. data/doc/images/loadingAnimation.gif +0 -0
  31. data/doc/images/macFFBgHack.png +0 -0
  32. data/doc/images/package.png +0 -0
  33. data/doc/images/page_green.png +0 -0
  34. data/doc/images/page_white_text.png +0 -0
  35. data/doc/images/page_white_width.png +0 -0
  36. data/doc/images/plugin.png +0 -0
  37. data/doc/images/ruby.png +0 -0
  38. data/doc/images/tag_green.png +0 -0
  39. data/doc/images/wrench.png +0 -0
  40. data/doc/images/wrench_orange.png +0 -0
  41. data/doc/images/zoom.png +0 -0
  42. data/doc/index.html +120 -0
  43. data/doc/js/darkfish.js +116 -0
  44. data/doc/js/jquery.js +32 -0
  45. data/doc/js/quicksearch.js +114 -0
  46. data/doc/js/thickbox-compressed.js +10 -0
  47. data/doc/lib/structured_warnings/dynamic_rb.html +65 -0
  48. data/doc/lib/structured_warnings/kernel_rb.html +52 -0
  49. data/doc/lib/structured_warnings/test/assertions_rb.html +52 -0
  50. data/doc/lib/structured_warnings/test/warner_rb.html +52 -0
  51. data/doc/lib/structured_warnings/test_rb.html +56 -0
  52. data/doc/lib/structured_warnings/warner_rb.html +52 -0
  53. data/doc/lib/structured_warnings/warning_rb.html +64 -0
  54. data/doc/lib/structured_warnings_rb.html +62 -0
  55. data/doc/rdoc.css +763 -0
  56. data/lib/structured_warnings.rb +6 -9
  57. data/lib/structured_warnings/dynamic.rb +6 -6
  58. data/lib/structured_warnings/kernel.rb +9 -9
  59. data/lib/structured_warnings/test.rb +2 -3
  60. data/lib/structured_warnings/test/assertions.rb +21 -9
  61. data/lib/structured_warnings/test/warner.rb +2 -2
  62. data/lib/structured_warnings/warner.rb +1 -1
  63. data/lib/structured_warnings/warning.rb +11 -11
  64. data/structured_warnings.gemspec +15 -58
  65. data/test/structured_warnings_test.rb +7 -6
  66. metadata +85 -62
  67. data/.gitignore +0 -2
  68. data/test/test_helper.rb +0 -4
  69. data/version.yml +0 -4
data/doc/Warning.html ADDED
@@ -0,0 +1,460 @@
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: Warning</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="class">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="./index.html">Home</a>
25
+ <a href="./index.html#classes">Classes</a>
26
+ <a href="./index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="./lib/structured_warnings/warning_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="lib/structured_warnings/warning.rb">lib/structured_warnings/warning.rb</a></li>
39
+
40
+ </ul>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div id="class-metadata">
48
+
49
+ <!-- Parent Class -->
50
+ <div id="parent-class-section" class="section">
51
+ <h3 class="section-header">Parent</h3>
52
+
53
+ <p class="link"><a href="Object.html">Object</a></p>
54
+
55
+ </div>
56
+
57
+
58
+
59
+
60
+
61
+ <!-- Namespace Contents -->
62
+ <div id="namespace-list-section" class="section">
63
+ <h3 class="section-header">Namespace</h3>
64
+ <ul class="link-list">
65
+
66
+ <li><span class="type">MODULE</span> <a href="Warning/ClassMethods.html">Warning::ClassMethods</a></li>
67
+
68
+ </ul>
69
+ </div>
70
+
71
+
72
+
73
+ <!-- Method Quickref -->
74
+ <div id="method-list-section" class="section">
75
+ <h3 class="section-header">Methods</h3>
76
+ <ul class="link-list">
77
+
78
+ <li><a href="#method-c-new">::new</a></li>
79
+
80
+ <li><a href="#method-i-backtrace">#backtrace</a></li>
81
+
82
+ <li><a href="#method-i-inspect">#inspect</a></li>
83
+
84
+ <li><a href="#method-i-message">#message</a></li>
85
+
86
+ <li><a href="#method-i-set_backtrace">#set_backtrace</a></li>
87
+
88
+ <li><a href="#method-i-to_s">#to_s</a></li>
89
+
90
+ <li><a href="#method-i-to_str">#to_str</a></li>
91
+
92
+ </ul>
93
+ </div>
94
+
95
+
96
+
97
+ </div>
98
+
99
+ <div id="project-metadata">
100
+
101
+
102
+ <div id="fileindex-section" class="section project-section">
103
+ <h3 class="section-header">Files</h3>
104
+ <ul>
105
+
106
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
107
+
108
+ </ul>
109
+ </div>
110
+
111
+
112
+ <div id="classindex-section" class="section project-section">
113
+ <h3 class="section-header">Class/Module Index
114
+ <span class="search-toggle"><img src="./images/find.png"
115
+ height="16" width="16" alt="[+]"
116
+ title="show/hide quicksearch" /></span></h3>
117
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
118
+ <fieldset>
119
+ <legend>Quicksearch</legend>
120
+ <input type="text" name="quicksearch" value=""
121
+ class="quicksearch-field" />
122
+ </fieldset>
123
+ </form>
124
+
125
+ <ul class="link-list">
126
+
127
+ <li><a href="./StructuredWarnings.html">StructuredWarnings</a></li>
128
+
129
+ <li><a href="./StructuredWarnings/ClassMethods.html">StructuredWarnings::ClassMethods</a></li>
130
+
131
+ <li><a href="./StructuredWarnings/Kernel.html">StructuredWarnings::Kernel</a></li>
132
+
133
+ <li><a href="./StructuredWarnings/Test.html">StructuredWarnings::Test</a></li>
134
+
135
+ <li><a href="./StructuredWarnings/Test/Assertions.html">StructuredWarnings::Test::Assertions</a></li>
136
+
137
+ <li><a href="./StructuredWarnings/Test/Warner.html">StructuredWarnings::Test::Warner</a></li>
138
+
139
+ <li><a href="./StructuredWarnings/Warner.html">StructuredWarnings::Warner</a></li>
140
+
141
+ <li><a href="./Warning.html">Warning</a></li>
142
+
143
+ <li><a href="./Warning/ClassMethods.html">Warning::ClassMethods</a></li>
144
+
145
+ <li><a href="./DeprecatedMethodWarning.html">DeprecatedMethodWarning</a></li>
146
+
147
+ <li><a href="./DeprecatedSignatureWarning.html">DeprecatedSignatureWarning</a></li>
148
+
149
+ <li><a href="./DeprecationWarning.html">DeprecationWarning</a></li>
150
+
151
+ <li><a href="./Dynamic.html">Dynamic</a></li>
152
+
153
+ <li><a href="./Object.html">Object</a></li>
154
+
155
+ <li><a href="./StandardWarning.html">StandardWarning</a></li>
156
+
157
+ </ul>
158
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
159
+ </div>
160
+
161
+
162
+ </div>
163
+ </div>
164
+
165
+ <div id="documentation">
166
+ <h1 class="class">Warning</h1>
167
+
168
+ <div id="description" class="description">
169
+
170
+ <p>Descendents of class <a href="Warning.html">Warning</a> are used to raise
171
+ structured warnings. They programmers to explicitly supress certain kinds
172
+ of warnings and provide additional information in contrast to the plain
173
+ warn method. They implement an Exception-like interface and carry
174
+ information about the warning – its type (the warning’s class name), an
175
+ optional descriptive string, and optional traceback information. Programs
176
+ may subclass <a href="Warning.html">Warning</a> to add additional
177
+ information.</p>
178
+
179
+ <p>Large portions of this class’s documentation are taken from the Exception
180
+ RDoc.</p>
181
+
182
+ </div><!-- description -->
183
+
184
+
185
+
186
+
187
+ <div id="5Buntitled-5D" class="documentation-section">
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+ <!-- Methods -->
197
+
198
+ <div id="public-class-method-details" class="method-section section">
199
+ <h3 class="section-header">Public Class Methods</h3>
200
+
201
+
202
+ <div id="new-method" class="method-detail ">
203
+ <a name="method-c-new"></a>
204
+
205
+
206
+ <div class="method-heading">
207
+ <span class="method-name">new</span><span
208
+ class="method-args">(message = nil)</span>
209
+ <span class="method-click-advice">click to toggle source</span>
210
+ </div>
211
+
212
+
213
+ <div class="method-description">
214
+
215
+ <p>Construct a new <a href="Warning.html">Warning</a> object, optionally
216
+ passing in a message.</p>
217
+
218
+
219
+
220
+ <div class="method-source-code" id="new-source">
221
+ <pre>
222
+ <span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 13</span>
223
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span> = <span class="ruby-keyword">nil</span>)
224
+ <span class="ruby-ivar">@message</span> = <span class="ruby-identifier">message</span>
225
+ <span class="ruby-ivar">@backtrace</span> = <span class="ruby-identifier">caller</span>(<span class="ruby-value">1</span>)
226
+ <span class="ruby-keyword">end</span></pre>
227
+ </div><!-- new-source -->
228
+
229
+ </div>
230
+
231
+
232
+
233
+
234
+ </div><!-- new-method -->
235
+
236
+
237
+ </div><!-- public-class-method-details -->
238
+
239
+ <div id="public-instance-method-details" class="method-section section">
240
+ <h3 class="section-header">Public Instance Methods</h3>
241
+
242
+
243
+ <div id="backtrace-method" class="method-detail ">
244
+ <a name="method-i-backtrace"></a>
245
+
246
+
247
+
248
+ <div class="method-heading">
249
+ <span class="method-callseq">backtrace => array</span>
250
+
251
+ <span class="method-click-advice">click to toggle source</span>
252
+
253
+ </div>
254
+
255
+
256
+
257
+ <div class="method-description">
258
+
259
+ <p>Returns any backtrace associated with the warning. The backtrace is an
260
+ array of strings, each containing either “filename:lineNo: in `method”‘ or
261
+ “filename:lineNo.”</p>
262
+
263
+
264
+
265
+ <div class="method-source-code" id="backtrace-source">
266
+ <pre>
267
+ <span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 25</span>
268
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">backtrace</span>
269
+ <span class="ruby-ivar">@backtrace</span>
270
+ <span class="ruby-keyword">end</span></pre>
271
+ </div><!-- backtrace-source -->
272
+
273
+ </div>
274
+
275
+
276
+
277
+
278
+ </div><!-- backtrace-method -->
279
+
280
+
281
+ <div id="inspect-method" class="method-detail ">
282
+ <a name="method-i-inspect"></a>
283
+
284
+
285
+ <div class="method-heading">
286
+ <span class="method-name">inspect</span><span
287
+ class="method-args">()</span>
288
+ <span class="method-click-advice">click to toggle source</span>
289
+ </div>
290
+
291
+
292
+ <div class="method-description">
293
+
294
+ <p>Return this warning’s class name and message</p>
295
+
296
+
297
+
298
+ <div class="method-source-code" id="inspect-source">
299
+ <pre>
300
+ <span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 44</span>
301
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">inspect</span>
302
+ <span class="ruby-node">&quot;#&lt;#{self.class}: #{self}&gt;&quot;</span>
303
+ <span class="ruby-keyword">end</span></pre>
304
+ </div><!-- inspect-source -->
305
+
306
+ </div>
307
+
308
+
309
+
310
+
311
+ </div><!-- inspect-method -->
312
+
313
+
314
+ <div id="message-method" class="method-detail method-alias">
315
+ <a name="method-i-message"></a>
316
+
317
+
318
+ <div class="method-heading">
319
+ <span class="method-name">message</span><span
320
+ class="method-args">()</span>
321
+ <span class="method-click-advice">click to toggle source</span>
322
+ </div>
323
+
324
+
325
+ <div class="method-description">
326
+
327
+
328
+
329
+
330
+
331
+ </div>
332
+
333
+
334
+
335
+
336
+ <div class="aliases">
337
+ Alias for: <a href="Warning.html#method-i-to_s">to_s</a>
338
+ </div>
339
+
340
+ </div><!-- message-method -->
341
+
342
+
343
+ <div id="set_backtrace-method" class="method-detail ">
344
+ <a name="method-i-set_backtrace"></a>
345
+
346
+
347
+ <div class="method-heading">
348
+ <span class="method-name">set_backtrace</span><span
349
+ class="method-args">(backtrace)</span>
350
+ <span class="method-click-advice">click to toggle source</span>
351
+ </div>
352
+
353
+
354
+ <div class="method-description">
355
+
356
+ <p>Sets the backtrace information associated with warning. The argument must
357
+ be an array of String objects in the format described in
358
+ Exception#backtrace.</p>
359
+
360
+
361
+
362
+ <div class="method-source-code" id="set_backtrace-source">
363
+ <pre>
364
+ <span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 32</span>
365
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">set_backtrace</span>(<span class="ruby-identifier">backtrace</span>)
366
+ <span class="ruby-ivar">@backtrace</span> = <span class="ruby-identifier">backtrace</span>
367
+ <span class="ruby-keyword">end</span></pre>
368
+ </div><!-- set_backtrace-source -->
369
+
370
+ </div>
371
+
372
+
373
+
374
+
375
+ </div><!-- set_backtrace-method -->
376
+
377
+
378
+ <div id="to_s-method" class="method-detail ">
379
+ <a name="method-i-to_s"></a>
380
+
381
+
382
+ <div class="method-heading">
383
+ <span class="method-name">to_s</span><span
384
+ class="method-args">()</span>
385
+ <span class="method-click-advice">click to toggle source</span>
386
+ </div>
387
+
388
+
389
+ <div class="method-description">
390
+
391
+ <p>Returns warning’s message (or the name of the warning if no message is
392
+ set).</p>
393
+
394
+
395
+
396
+ <div class="method-source-code" id="to_s-source">
397
+ <pre>
398
+ <span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 37</span>
399
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
400
+ <span class="ruby-ivar">@message</span> <span class="ruby-operator">||</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>
401
+ <span class="ruby-keyword">end</span></pre>
402
+ </div><!-- to_s-source -->
403
+
404
+ </div>
405
+
406
+
407
+ <div class="aliases">
408
+ Also aliased as: <a href="Warning.html#method-i-to_str">to_str</a>, <a href="Warning.html#method-i-message">message</a>
409
+ </div>
410
+
411
+
412
+
413
+ </div><!-- to_s-method -->
414
+
415
+
416
+ <div id="to_str-method" class="method-detail method-alias">
417
+ <a name="method-i-to_str"></a>
418
+
419
+
420
+ <div class="method-heading">
421
+ <span class="method-name">to_str</span><span
422
+ class="method-args">()</span>
423
+ <span class="method-click-advice">click to toggle source</span>
424
+ </div>
425
+
426
+
427
+ <div class="method-description">
428
+
429
+
430
+
431
+
432
+
433
+ </div>
434
+
435
+
436
+
437
+
438
+ <div class="aliases">
439
+ Alias for: <a href="Warning.html#method-i-to_s">to_s</a>
440
+ </div>
441
+
442
+ </div><!-- to_str-method -->
443
+
444
+
445
+ </div><!-- public-instance-method-details -->
446
+
447
+ </div><!-- 5Buntitled-5D -->
448
+
449
+
450
+ </div><!-- documentation -->
451
+
452
+ <div id="validator-badges">
453
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
454
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
455
+ Rdoc Generator</a> 2</small>.</p>
456
+ </div>
457
+
458
+ </body>
459
+ </html>
460
+