structured_warnings 0.1.4 → 0.2.0

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 (64) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +21 -0
  4. data/History.txt +7 -0
  5. data/README.rdoc +5 -5
  6. data/doc/DeprecatedMethodWarning.html +76 -141
  7. data/doc/DeprecatedSignatureWarning.html +76 -141
  8. data/doc/DeprecationWarning.html +76 -141
  9. data/doc/Dynamic.html +89 -136
  10. data/doc/Object.html +92 -161
  11. data/doc/README_rdoc.html +144 -157
  12. data/doc/StandardWarning.html +76 -141
  13. data/doc/StructuredWarnings.html +95 -157
  14. data/doc/StructuredWarnings/ClassMethods.html +131 -193
  15. data/doc/StructuredWarnings/Kernel.html +146 -198
  16. data/doc/StructuredWarnings/Test.html +71 -150
  17. data/doc/StructuredWarnings/Test/Assertions.html +194 -244
  18. data/doc/StructuredWarnings/Test/Warner.html +138 -201
  19. data/doc/StructuredWarnings/Warner.html +113 -177
  20. data/doc/Test.html +95 -0
  21. data/doc/Test/Unit.html +95 -0
  22. data/doc/Warning.html +276 -338
  23. data/doc/Warning/ClassMethods.html +182 -238
  24. data/doc/created.rid +10 -10
  25. data/doc/css/fonts.css +167 -0
  26. data/doc/css/rdoc.css +590 -0
  27. data/doc/fonts/Lato-Light.ttf +0 -0
  28. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  29. data/doc/fonts/Lato-Regular.ttf +0 -0
  30. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  31. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  32. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  33. data/doc/images/add.png +0 -0
  34. data/doc/images/arrow_up.png +0 -0
  35. data/doc/images/delete.png +0 -0
  36. data/doc/images/tag_blue.png +0 -0
  37. data/doc/images/transparent.png +0 -0
  38. data/doc/index.html +104 -103
  39. data/doc/js/darkfish.js +112 -67
  40. data/doc/js/jquery.js +4 -32
  41. data/doc/js/navigation.js +142 -0
  42. data/doc/js/navigation.js.gz +0 -0
  43. data/doc/js/search.js +109 -0
  44. data/doc/js/search_index.js +1 -0
  45. data/doc/js/search_index.js.gz +0 -0
  46. data/doc/js/searcher.js +228 -0
  47. data/doc/js/searcher.js.gz +0 -0
  48. data/doc/table_of_contents.html +200 -0
  49. data/lib/structured_warnings/dynamic.rb +12 -6
  50. data/lib/structured_warnings/kernel.rb +4 -4
  51. data/structured_warnings.gemspec +5 -1
  52. data/test/structured_warnings_test.rb +63 -9
  53. metadata +84 -43
  54. data/doc/js/quicksearch.js +0 -114
  55. data/doc/js/thickbox-compressed.js +0 -10
  56. data/doc/lib/structured_warnings/dynamic_rb.html +0 -65
  57. data/doc/lib/structured_warnings/kernel_rb.html +0 -52
  58. data/doc/lib/structured_warnings/test/assertions_rb.html +0 -52
  59. data/doc/lib/structured_warnings/test/warner_rb.html +0 -52
  60. data/doc/lib/structured_warnings/test_rb.html +0 -56
  61. data/doc/lib/structured_warnings/warner_rb.html +0 -52
  62. data/doc/lib/structured_warnings/warning_rb.html +0 -64
  63. data/doc/lib/structured_warnings_rb.html +0 -62
  64. data/doc/rdoc.css +0 -763
@@ -1,251 +1,197 @@
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">
1
+ <!DOCTYPE html>
2
+
3
+ <html>
5
4
  <head>
6
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
5
+ <meta charset="UTF-8">
7
6
 
8
- <title>Module: Warning::ClassMethods</title>
7
+ <title>module Warning::ClassMethods - structured_warnings</title>
9
8
 
10
- <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ </script>
11
12
 
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>
13
+ <script src="../js/jquery.js"></script>
14
+ <script src="../js/darkfish.js"></script>
16
15
 
17
- </head>
18
- <body id="top" class="module">
16
+ <link href="../css/fonts.css" rel="stylesheet">
17
+ <link href="../css/rdoc.css" rel="stylesheet">
19
18
 
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
19
 
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
20
 
44
-
45
- </div>
21
+ <body id="top" role="document" class="module">
22
+ <nav role="navigation">
23
+ <div id="project-navigation">
24
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
25
+ <h2>
26
+ <a href="../index.html" rel="home">Home</a>
27
+ </h2>
46
28
 
47
- <div id="class-metadata">
48
-
29
+ <div id="table-of-contents-navigation">
30
+ <a href="../table_of_contents.html#pages">Pages</a>
31
+ <a href="../table_of_contents.html#classes">Classes</a>
32
+ <a href="../table_of_contents.html#methods">Methods</a>
33
+ </div>
34
+ </div>
35
+
36
+ <div id="search-section" role="search" class="project-section initially-hidden">
37
+ <form action="#" method="get" accept-charset="utf-8">
38
+ <div id="search-field-wrapper">
39
+ <input id="search-field" role="combobox" aria-label="Search"
40
+ aria-autocomplete="list" aria-controls="search-results"
41
+ type="text" name="search" placeholder="Search" spellcheck="false"
42
+ title="Type to search, Up and Down to navigate, Enter to load">
43
+ </div>
49
44
 
50
-
45
+ <ul id="search-results" aria-label="Search Results"
46
+ aria-busy="false" aria-expanded="false"
47
+ aria-atomic="false" class="initially-hidden"></ul>
48
+ </form>
49
+ </div>
51
50
 
52
-
51
+ </div>
53
52
 
54
-
55
- <!-- Method Quickref -->
56
- <div id="method-list-section" class="section">
57
- <h3 class="section-header">Methods</h3>
58
- <ul class="link-list">
59
-
60
- <li><a href="#method-i-active-3F">#active?</a></li>
61
-
62
- <li><a href="#method-i-disable">#disable</a></li>
63
-
64
- <li><a href="#method-i-enable">#enable</a></li>
65
-
66
- </ul>
67
- </div>
68
-
53
+
69
54
 
70
-
71
- </div>
55
+ <div id="class-metadata">
56
+
57
+
58
+
59
+
60
+ <!-- Method Quickref -->
61
+ <div id="method-list-section" class="nav-section">
62
+ <h3>Methods</h3>
72
63
 
73
- <div id="project-metadata">
74
-
75
-
76
- <div id="fileindex-section" class="section project-section">
77
- <h3 class="section-header">Files</h3>
78
- <ul>
79
-
80
- <li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
81
-
82
- </ul>
83
- </div>
84
-
85
-
86
- <div id="classindex-section" class="section project-section">
87
- <h3 class="section-header">Class/Module Index
88
- <span class="search-toggle"><img src="../images/find.png"
89
- height="16" width="16" alt="[+]"
90
- title="show/hide quicksearch" /></span></h3>
91
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
92
- <fieldset>
93
- <legend>Quicksearch</legend>
94
- <input type="text" name="quicksearch" value=""
95
- class="quicksearch-field" />
96
- </fieldset>
97
- </form>
98
-
99
- <ul class="link-list">
100
-
101
- <li><a href="../StructuredWarnings.html">StructuredWarnings</a></li>
102
-
103
- <li><a href="../StructuredWarnings/ClassMethods.html">StructuredWarnings::ClassMethods</a></li>
104
-
105
- <li><a href="../StructuredWarnings/Kernel.html">StructuredWarnings::Kernel</a></li>
106
-
107
- <li><a href="../StructuredWarnings/Test.html">StructuredWarnings::Test</a></li>
108
-
109
- <li><a href="../StructuredWarnings/Test/Assertions.html">StructuredWarnings::Test::Assertions</a></li>
110
-
111
- <li><a href="../StructuredWarnings/Test/Warner.html">StructuredWarnings::Test::Warner</a></li>
112
-
113
- <li><a href="../StructuredWarnings/Warner.html">StructuredWarnings::Warner</a></li>
114
-
115
- <li><a href="../Warning.html">Warning</a></li>
116
-
117
- <li><a href="../Warning/ClassMethods.html">Warning::ClassMethods</a></li>
118
-
119
- <li><a href="../DeprecatedMethodWarning.html">DeprecatedMethodWarning</a></li>
120
-
121
- <li><a href="../DeprecatedSignatureWarning.html">DeprecatedSignatureWarning</a></li>
122
-
123
- <li><a href="../DeprecationWarning.html">DeprecationWarning</a></li>
124
-
125
- <li><a href="../Dynamic.html">Dynamic</a></li>
126
-
127
- <li><a href="../Object.html">Object</a></li>
128
-
129
- <li><a href="../StandardWarning.html">StandardWarning</a></li>
130
-
131
- </ul>
132
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
133
- </div>
64
+ <ul class="link-list" role="directory">
65
+
66
+ <li ><a href="#method-i-active-3F">#active?</a>
67
+
68
+ <li ><a href="#method-i-disable">#disable</a>
69
+
70
+ <li ><a href="#method-i-enable">#enable</a>
71
+
72
+ </ul>
73
+ </div>
134
74
 
135
-
136
- </div>
137
75
  </div>
76
+ </nav>
138
77
 
139
- <div id="documentation">
140
- <h1 class="module">Warning::ClassMethods</h1>
78
+ <main role="main" aria-labelledby="module-Warning::ClassMethods">
79
+ <h1 id="module-Warning::ClassMethods" class="module">
80
+ module Warning::ClassMethods
81
+ </h1>
141
82
 
142
- <div id="description" class="description">
143
-
83
+ <section class="description">
84
+
144
85
  <p>This module extends <a href="../Warning.html">Warning</a> and each
145
86
  subclass. It may be used to activate or deactivate a set of warnings.</p>
146
87
 
147
- </div><!-- description -->
88
+ </section>
148
89
 
90
+
91
+
92
+
93
+ <section id="5Buntitled-5D" class="documentation-section">
149
94
 
150
-
151
-
152
- <div id="5Buntitled-5D" class="documentation-section">
153
-
154
95
 
155
-
156
-
157
-
96
+
158
97
 
159
-
98
+
160
99
 
161
- <!-- Methods -->
162
-
163
- <div id="public-instance-method-details" class="method-section section">
164
- <h3 class="section-header">Public Instance Methods</h3>
100
+
165
101
 
166
-
167
- <div id="active-3F-method" class="method-detail ">
168
- <a name="method-i-active-3F"></a>
102
+
103
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
104
+ <header>
105
+ <h3>Public Instance Methods</h3>
106
+ </header>
169
107
 
108
+
109
+ <div id="method-i-active-3F" class="method-detail ">
110
+
111
+ <div class="method-heading">
112
+ <span class="method-name">active?</span><span
113
+ class="method-args">()</span>
170
114
 
171
- <div class="method-heading">
172
- <span class="method-name">active?</span><span
173
- class="method-args">()</span>
174
- <span class="method-click-advice">click to toggle source</span>
175
- </div>
115
+ <span class="method-click-advice">click to toggle source</span>
176
116
 
117
+ </div>
118
+
177
119
 
178
- <div class="method-description">
179
-
180
- <p>returns a Boolean, stating whether a warning of this type would be emmitted
120
+ <div class="method-description">
121
+
122
+ <p>returns a Boolean, stating whether a warning of this type would be emmitted
181
123
  or not.</p>
182
-
124
+
125
+
183
126
 
184
-
185
- <div class="method-source-code" id="active-3F-source">
186
- <pre>
187
- <span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 53</span>
127
+
128
+ <div class="method-source-code" id="active-3F-source">
129
+ <pre><span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 53</span>
188
130
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">active?</span>
189
131
  <span class="ruby-constant">StructuredWarnings</span><span class="ruby-operator">::</span><span class="ruby-identifier">disabled_warnings</span>.<span class="ruby-identifier">all?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">w</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-keyword">self</span>)}
190
132
  <span class="ruby-keyword">end</span></pre>
191
- </div><!-- active-3F-source -->
192
-
193
133
  </div>
194
-
195
134
 
135
+ </div>
196
136
 
197
-
198
- </div><!-- active-3F-method -->
137
+
199
138
 
200
-
201
- <div id="disable-method" class="method-detail ">
202
- <a name="method-i-disable"></a>
139
+
140
+ </div>
203
141
 
142
+
143
+ <div id="method-i-disable" class="method-detail ">
144
+
145
+
146
+ <div class="method-heading">
147
+ <span class="method-callseq">
148
+ disable()
149
+ </span>
204
150
 
151
+ <span class="method-click-advice">click to toggle source</span>
205
152
 
206
- <div class="method-heading">
207
- <span class="method-callseq">disable()</span>
208
-
209
- <span class="method-click-advice">click to toggle source</span>
210
-
211
- </div>
212
-
213
- <div class="method-heading">
214
- <span class="method-callseq">disable() {...}</span>
215
-
216
- </div>
217
-
153
+ </div>
154
+
155
+ <div class="method-heading">
156
+ <span class="method-callseq">
157
+ disable() {...}
158
+ </span>
218
159
 
160
+ </div>
161
+
162
+
219
163
 
220
- <div class="method-description">
221
-
222
- <p>If called without a block, Warnings of this type will be disabled in the
164
+ <div class="method-description">
165
+
166
+ <p>If called without a block, Warnings of this type will be disabled in the
223
167
  current thread and all new child threads.</p>
224
168
 
225
- <pre>warn(&quot;this will be printed&quot;) # creates a StandardWarning which is
226
- # enabled by default
169
+ <pre class="ruby"><span class="ruby-identifier">warn</span>(<span class="ruby-string">&quot;this will be printed&quot;</span>) <span class="ruby-comment"># creates a StandardWarning which is</span>
170
+ <span class="ruby-comment"># enabled by default</span>
227
171
 
228
- Warning.disable
172
+ <span class="ruby-constant">Warning</span>.<span class="ruby-identifier">disable</span>
229
173
 
230
- warn(&quot;this will not be printed&quot;) # creates a StandardWarning which is
231
- # currently disabled</pre>
174
+ <span class="ruby-identifier">warn</span>(<span class="ruby-string">&quot;this will not be printed&quot;</span>) <span class="ruby-comment"># creates a StandardWarning which is</span>
175
+ <span class="ruby-comment"># currently disabled</span>
176
+ </pre>
232
177
 
233
178
  <p>If called with a block, warnings of this type will be disabled in the
234
179
  dynamic scope of the given block.</p>
235
180
 
236
- <pre>Warning.disable do
237
- warn(&quot;this will not be printed&quot;) # creates a StandardWarning which is
238
- # currently disabled
239
- end
181
+ <pre class="ruby"><span class="ruby-constant">Warning</span>.<span class="ruby-identifier">disable</span> <span class="ruby-keyword">do</span>
182
+ <span class="ruby-identifier">warn</span>(<span class="ruby-string">&quot;this will not be printed&quot;</span>) <span class="ruby-comment"># creates a StandardWarning which is</span>
183
+ <span class="ruby-comment"># currently disabled</span>
184
+ <span class="ruby-keyword">end</span>
240
185
 
241
- warn(&quot;this will be printed&quot;) # creates a StandardWarning which is
242
- # currently enabled</pre>
243
-
186
+ <span class="ruby-identifier">warn</span>(<span class="ruby-string">&quot;this will be printed&quot;</span>) <span class="ruby-comment"># creates a StandardWarning which is</span>
187
+ <span class="ruby-comment"># currently enabled</span>
188
+ </pre>
189
+
190
+
244
191
 
245
-
246
- <div class="method-source-code" id="disable-source">
247
- <pre>
248
- <span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 82</span>
192
+
193
+ <div class="method-source-code" id="disable-source">
194
+ <pre><span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 82</span>
249
195
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">disable</span>
250
196
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
251
197
  <span class="ruby-constant">StructuredWarnings</span><span class="ruby-operator">::</span><span class="ruby-identifier">with_disabled_warnings</span>(
@@ -256,46 +202,48 @@ warn(&quot;this will be printed&quot;) # creates a StandardWarning which is
256
202
  <span class="ruby-constant">StructuredWarnings</span><span class="ruby-operator">::</span><span class="ruby-identifier">disabled_warnings</span> <span class="ruby-operator">|=</span> [<span class="ruby-keyword">self</span>]
257
203
  <span class="ruby-keyword">end</span>
258
204
  <span class="ruby-keyword">end</span></pre>
259
- </div><!-- disable-source -->
260
-
261
205
  </div>
262
-
263
206
 
207
+ </div>
264
208
 
265
-
266
- </div><!-- disable-method -->
209
+
267
210
 
268
-
269
- <div id="enable-method" class="method-detail ">
270
- <a name="method-i-enable"></a>
211
+
212
+ </div>
271
213
 
214
+
215
+ <div id="method-i-enable" class="method-detail ">
216
+
217
+
218
+ <div class="method-heading">
219
+ <span class="method-callseq">
220
+ enable()
221
+ </span>
272
222
 
223
+ <span class="method-click-advice">click to toggle source</span>
273
224
 
274
- <div class="method-heading">
275
- <span class="method-callseq">enable()</span>
276
-
277
- <span class="method-click-advice">click to toggle source</span>
278
-
279
- </div>
280
-
281
- <div class="method-heading">
282
- <span class="method-callseq">enable() {...}</span>
283
-
284
- </div>
285
-
225
+ </div>
226
+
227
+ <div class="method-heading">
228
+ <span class="method-callseq">
229
+ enable() {...}
230
+ </span>
286
231
 
232
+ </div>
233
+
234
+
287
235
 
288
- <div class="method-description">
289
-
290
- <p>This method has the same semantics as disable, only with the opposite
236
+ <div class="method-description">
237
+
238
+ <p>This method has the same semantics as disable, only with the opposite
291
239
  outcome. In general the last assignment wins, so that disabled warnings may
292
240
  be enabled again and so on.</p>
293
-
241
+
242
+
294
243
 
295
-
296
- <div class="method-source-code" id="enable-source">
297
- <pre>
298
- <span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 100</span>
244
+
245
+ <div class="method-source-code" id="enable-source">
246
+ <pre><span class="ruby-comment"># File lib/structured_warnings/warning.rb, line 100</span>
299
247
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">enable</span>
300
248
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
301
249
  <span class="ruby-constant">StructuredWarnings</span><span class="ruby-operator">::</span><span class="ruby-identifier">with_disabled_warnings</span>(
@@ -306,29 +254,25 @@ be enabled again and so on.</p>
306
254
  <span class="ruby-constant">StructuredWarnings</span><span class="ruby-operator">::</span><span class="ruby-identifier">disabled_warnings</span> <span class="ruby-operator">-=</span> [<span class="ruby-keyword">self</span>]
307
255
  <span class="ruby-keyword">end</span>
308
256
  <span class="ruby-keyword">end</span></pre>
309
- </div><!-- enable-source -->
310
-
311
257
  </div>
312
-
313
258
 
259
+ </div>
314
260
 
315
-
316
- </div><!-- enable-method -->
261
+
262
+
263
+
264
+ </div>
317
265
 
318
-
319
- </div><!-- public-instance-method-details -->
320
266
 
321
- </div><!-- 5Buntitled-5D -->
267
+ </section>
322
268
 
269
+ </section>
270
+ </main>
323
271
 
324
- </div><!-- documentation -->
325
-
326
- <div id="validator-badges">
327
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
328
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
329
- Rdoc Generator</a> 2</small>.</p>
330
- </div>
331
272
 
332
- </body>
333
- </html>
273
+ <footer id="validator-badges" role="contentinfo">
274
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
275
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
276
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
277
+ </footer>
334
278