tool-shed 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/Gemfile +3 -1
  2. data/Gemfile.lock +82 -0
  3. data/README.md +7 -5
  4. data/bin/as-asset-detector +0 -0
  5. data/lib/shed/asdoc_package.rb +1 -1
  6. data/lib/shed/manifest.rb +12 -4
  7. data/lib/shed/opts/manifest_opts.rb +11 -4
  8. data/lib/shed/opts/tool_opts.rb +8 -5
  9. data/lib/shed/opts/unused_asset_opts.rb +1 -1
  10. data/lib/shed/opts/unused_class_opts.rb +16 -1
  11. data/lib/shed/opts/unused_style_opts.rb +1 -1
  12. data/lib/shed/search.rb +6 -5
  13. data/lib/shed/tool.rb +16 -3
  14. data/lib/shed/unused_asset.rb +37 -12
  15. data/lib/shed/unused_class.rb +4 -4
  16. data/lib/shed/version.rb +1 -1
  17. data/rakefile.rb +20 -84
  18. data/test/fixtures/unused-asset/src/org/helvector/ToolBox.mxml +4 -0
  19. data/test/test_helper.rb +13 -0
  20. data/test/unit/test_manifest.rb +23 -2
  21. data/test/unit/test_manifest_opts.rb +15 -0
  22. data/test/unit/test_search.rb +16 -4
  23. data/test/unit/test_unused_asset.rb +24 -14
  24. data/test/unit/test_unused_class_opts.rb +28 -1
  25. metadata +41 -69
  26. data/coverage/unit/index.html +0 -330
  27. data/coverage/unit/jquery-1.3.2.min.js +0 -19
  28. data/coverage/unit/jquery.tablesorter.min.js +0 -15
  29. data/coverage/unit/lib-hel-asdoc_package_rb.html +0 -447
  30. data/coverage/unit/lib-hel-manifest_rb.html +0 -555
  31. data/coverage/unit/lib-hel-opts-asdoc_package_opts_rb.html +0 -195
  32. data/coverage/unit/lib-hel-opts-manifest_opts_rb.html +0 -195
  33. data/coverage/unit/lib-hel-opts-tool_opts_rb.html +0 -531
  34. data/coverage/unit/lib-hel-opts-unused_class_opts_rb.html +0 -207
  35. data/coverage/unit/lib-hel-opts-unused_style_opts_rb.html +0 -201
  36. data/coverage/unit/lib-hel-project_tools_rb.html +0 -423
  37. data/coverage/unit/lib-hel-search_rb.html +0 -363
  38. data/coverage/unit/lib-hel-stripper_rb.html +0 -357
  39. data/coverage/unit/lib-hel-tool_rb.html +0 -423
  40. data/coverage/unit/lib-hel-unused_class_rb.html +0 -675
  41. data/coverage/unit/lib-hel-unused_style_rb.html +0 -747
  42. data/coverage/unit/lib-hel-version_rb.html +0 -135
  43. data/coverage/unit/lib-hel_tools_rb.html +0 -165
  44. data/coverage/unit/print.css +0 -12
  45. data/coverage/unit/rcov.js +0 -42
  46. data/coverage/unit/screen.css +0 -270
  47. data/coverage.data +0 -0
  48. data/rdoc/classes/ASDocPackage.html +0 -281
  49. data/rdoc/classes/ASDocPackageOpts.html +0 -204
  50. data/rdoc/classes/Manifest.html +0 -323
  51. data/rdoc/classes/ManifestOpts.html +0 -205
  52. data/rdoc/classes/ProjectTools.html +0 -302
  53. data/rdoc/classes/Search.html +0 -203
  54. data/rdoc/classes/Stripper.html +0 -223
  55. data/rdoc/classes/Tool.html +0 -313
  56. data/rdoc/classes/ToolOpts.html +0 -297
  57. data/rdoc/classes/UnusedClass.html +0 -258
  58. data/rdoc/classes/UnusedClassOpts.html +0 -206
  59. data/rdoc/classes/UnusedStyle.html +0 -277
  60. data/rdoc/classes/UnusedStyleOpts.html +0 -205
  61. data/rdoc/created.rid +0 -1
  62. data/rdoc/files/LICENSE.html +0 -129
  63. data/rdoc/files/README_md.html +0 -138
  64. data/rdoc/files/lib/hel/asdoc_package_rb.html +0 -107
  65. data/rdoc/files/lib/hel/manifest_rb.html +0 -107
  66. data/rdoc/files/lib/hel/opts/asdoc_package_opts_rb.html +0 -107
  67. data/rdoc/files/lib/hel/opts/manifest_opts_rb.html +0 -107
  68. data/rdoc/files/lib/hel/opts/tool_opts_rb.html +0 -114
  69. data/rdoc/files/lib/hel/opts/unused_class_opts_rb.html +0 -107
  70. data/rdoc/files/lib/hel/opts/unused_style_opts_rb.html +0 -107
  71. data/rdoc/files/lib/hel/project_tools_rb.html +0 -107
  72. data/rdoc/files/lib/hel/search_rb.html +0 -114
  73. data/rdoc/files/lib/hel/stripper_rb.html +0 -107
  74. data/rdoc/files/lib/hel/tool_rb.html +0 -107
  75. data/rdoc/files/lib/hel/unused_class_rb.html +0 -107
  76. data/rdoc/files/lib/hel/unused_style_rb.html +0 -107
  77. data/rdoc/files/lib/hel/version_rb.html +0 -107
  78. data/rdoc/files/lib/hel_tools_rb.html +0 -127
  79. data/rdoc/fr_class_index.html +0 -39
  80. data/rdoc/fr_file_index.html +0 -43
  81. data/rdoc/fr_method_index.html +0 -75
  82. data/rdoc/index.html +0 -24
  83. data/rdoc/rdoc-style.css +0 -208
  84. data/tool-shed-0.0.3.gem +0 -0
  85. data/tool-shed.gemspec +0 -41
@@ -1,223 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: Stripper</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Stripper</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/hel/stripper_rb.html">
59
- lib/hel/stripper.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
- <div id="description">
76
- <p>
77
- encoding: utf-8
78
- </p>
79
-
80
- </div>
81
-
82
-
83
- </div>
84
-
85
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000049">comments</a>&nbsp;&nbsp;
90
- <a href="#M000048">ecma_comments</a>&nbsp;&nbsp;
91
- <a href="#M000047">xml_comments</a>&nbsp;&nbsp;
92
- </div>
93
- </div>
94
-
95
- </div>
96
-
97
-
98
- <!-- if includes -->
99
-
100
- <div id="section">
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
- <!-- if method_list -->
110
- <div id="methods">
111
- <h3 class="section-bar">Public Class methods</h3>
112
-
113
- <div id="method-M000049" class="method-detail">
114
- <a name="M000049"></a>
115
-
116
- <div class="method-heading">
117
- <a href="#M000049" class="method-signature">
118
- <span class="method-name">comments</span><span class="method-args">(str)</span>
119
- </a>
120
- </div>
121
-
122
- <div class="method-description">
123
- <p>
124
- Strips both xml and ecma script <a
125
- href="Stripper.html#M000049">comments</a>.
126
- </p>
127
- <p><a class="source-toggle" href="#"
128
- onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
129
- <div class="method-source-code" id="M000049-source">
130
- <pre>
131
- <span class="ruby-comment cmt"># File lib/hel/stripper.rb, line 41</span>
132
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">comments</span>(<span class="ruby-identifier">str</span>)
133
- <span class="ruby-identifier">str</span> = <span class="ruby-identifier">xml_comments</span>(<span class="ruby-identifier">str</span>)
134
- <span class="ruby-identifier">str</span> = <span class="ruby-identifier">ecma_comments</span>(<span class="ruby-identifier">str</span>)
135
- <span class="ruby-identifier">str</span>
136
- <span class="ruby-keyword kw">end</span>
137
- </pre>
138
- </div>
139
- </div>
140
- </div>
141
-
142
- <div id="method-M000048" class="method-detail">
143
- <a name="M000048"></a>
144
-
145
- <div class="method-heading">
146
- <a href="#M000048" class="method-signature">
147
- <span class="method-name">ecma_comments</span><span class="method-args">(str)</span>
148
- </a>
149
- </div>
150
-
151
- <div class="method-description">
152
- <p>
153
- Strips <a href="Stripper.html#M000049">comments</a> from the document.
154
- </p>
155
- <p><a class="source-toggle" href="#"
156
- onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
157
- <div class="method-source-code" id="M000048-source">
158
- <pre>
159
- <span class="ruby-comment cmt"># File lib/hel/stripper.rb, line 19</span>
160
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ecma_comments</span>(<span class="ruby-identifier">str</span>)
161
-
162
- <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\/\*(?:.|([\r\n]))*?\*\//</span>,<span class="ruby-value str">''</span>)
163
-
164
- <span class="ruby-comment cmt"># This is designed to leave whitespace in</span>
165
- <span class="ruby-comment cmt"># place so the caret position remains correct.</span>
166
- <span class="ruby-comment cmt">#do |s|</span>
167
- <span class="ruby-comment cmt"># if $1</span>
168
- <span class="ruby-comment cmt"># a = s.split(&quot;\n&quot;)</span>
169
- <span class="ruby-comment cmt"># r = &quot;\n&quot; * (a.length-1) if a.length &gt; 1</span>
170
- <span class="ruby-comment cmt"># r</span>
171
- <span class="ruby-comment cmt"># end</span>
172
- <span class="ruby-comment cmt">#end</span>
173
-
174
- <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\/\/.*$/</span>,<span class="ruby-value str">''</span>)
175
- <span class="ruby-identifier">str</span>
176
-
177
- <span class="ruby-keyword kw">end</span>
178
- </pre>
179
- </div>
180
- </div>
181
- </div>
182
-
183
- <div id="method-M000047" class="method-detail">
184
- <a name="M000047"></a>
185
-
186
- <div class="method-heading">
187
- <a href="#M000047" class="method-signature">
188
- <span class="method-name">xml_comments</span><span class="method-args">(str)</span>
189
- </a>
190
- </div>
191
-
192
- <div class="method-description">
193
- <p>
194
- Strips xml <a href="Stripper.html#M000049">comments</a> from the document.
195
- </p>
196
- <p><a class="source-toggle" href="#"
197
- onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
198
- <div class="method-source-code" id="M000047-source">
199
- <pre>
200
- <span class="ruby-comment cmt"># File lib/hel/stripper.rb, line 10</span>
201
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_comments</span>(<span class="ruby-identifier">str</span>)
202
- <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/&lt;!--(?:.|([\r\n]))*?--&gt;/</span>,<span class="ruby-value str">''</span>)
203
- <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/&lt;!--.*--&gt;/</span>,<span class="ruby-value str">''</span>)
204
- <span class="ruby-identifier">str</span>
205
- <span class="ruby-keyword kw">end</span>
206
- </pre>
207
- </div>
208
- </div>
209
- </div>
210
-
211
-
212
- </div>
213
-
214
-
215
- </div>
216
-
217
-
218
- <div id="validator-badges">
219
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
220
- </div>
221
-
222
- </body>
223
- </html>
@@ -1,313 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Tool</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Tool</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/hel/tool_rb.html">
59
- lib/hel/tool.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- Abstract base class for tools. Provides basic default settings, and allows
84
- control over the level of logging to standard out.
85
- </p>
86
-
87
- </div>
88
-
89
-
90
- </div>
91
-
92
- <div id="method-list">
93
- <h3 class="section-bar">Methods</h3>
94
-
95
- <div class="name-list">
96
- <a href="#M000021">generated_at</a>&nbsp;&nbsp;
97
- <a href="#M000018">log</a>&nbsp;&nbsp;
98
- <a href="#M000016">new</a>&nbsp;&nbsp;
99
- <a href="#M000017">puts</a>&nbsp;&nbsp;
100
- <a href="#M000020">to_disk</a>&nbsp;&nbsp;
101
- <a href="#M000019">valid_opts</a>&nbsp;&nbsp;
102
- </div>
103
- </div>
104
-
105
- </div>
106
-
107
-
108
- <!-- if includes -->
109
-
110
- <div id="section">
111
-
112
-
113
- <div id="constants-list">
114
- <h3 class="section-bar">Constants</h3>
115
-
116
- <div class="name-list">
117
- <table summary="Constants">
118
- <tr class="top-aligned-row context-row">
119
- <td class="context-item-name">INVALID_OPTS</td>
120
- <td>=</td>
121
- <td class="context-item-value">&quot;Warning Invalid Options.&quot;</td>
122
- </tr>
123
- </table>
124
- </div>
125
- </div>
126
-
127
-
128
-
129
-
130
-
131
-
132
- <!-- if method_list -->
133
- <div id="methods">
134
- <h3 class="section-bar">Public Class methods</h3>
135
-
136
- <div id="method-M000016" class="method-detail">
137
- <a name="M000016"></a>
138
-
139
- <div class="method-heading">
140
- <a href="#M000016" class="method-signature">
141
- <span class="method-name">new</span><span class="method-args">(opt,out=STDOUT)</span>
142
- </a>
143
- </div>
144
-
145
- <div class="method-description">
146
- <p><a class="source-toggle" href="#"
147
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
148
- <div class="method-source-code" id="M000016-source">
149
- <pre>
150
- <span class="ruby-comment cmt"># File lib/hel/tool.rb, line 11</span>
151
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">opt</span>,<span class="ruby-identifier">out</span>=<span class="ruby-constant">STDOUT</span>)
152
- <span class="ruby-ivar">@src</span> = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:src</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'.'</span>
153
- <span class="ruby-ivar">@output</span> = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:output</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'hel-tool.txt'</span>
154
- <span class="ruby-ivar">@verbose</span> = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:verbose</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
155
- <span class="ruby-ivar">@silent</span> = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:silent</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
156
- <span class="ruby-ivar">@excludes</span> = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:excludes</span>] <span class="ruby-operator">||</span> [<span class="ruby-value str">'.svn'</span>,<span class="ruby-value str">'.git'</span>]
157
- <span class="ruby-ivar">@out</span> = <span class="ruby-identifier">out</span>
158
- <span class="ruby-keyword kw">end</span>
159
- </pre>
160
- </div>
161
- </div>
162
- </div>
163
-
164
- <h3 class="section-bar">Public Instance methods</h3>
165
-
166
- <div id="method-M000021" class="method-detail">
167
- <a name="M000021"></a>
168
-
169
- <div class="method-heading">
170
- <a href="#M000021" class="method-signature">
171
- <span class="method-name">generated_at</span><span class="method-args">()</span>
172
- </a>
173
- </div>
174
-
175
- <div class="method-description">
176
- <p>
177
- Generate a timestamp to include in reports.
178
- </p>
179
- <p><a class="source-toggle" href="#"
180
- onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
181
- <div class="method-source-code" id="M000021-source">
182
- <pre>
183
- <span class="ruby-comment cmt"># File lib/hel/tool.rb, line 56</span>
184
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generated_at</span>
185
- <span class="ruby-value str">&quot;Generated at&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">&quot; [%m/%d/%Y %H:%M:%S] &quot;</span>)
186
- <span class="ruby-keyword kw">end</span>
187
- </pre>
188
- </div>
189
- </div>
190
- </div>
191
-
192
- <div id="method-M000018" class="method-detail">
193
- <a name="M000018"></a>
194
-
195
- <div class="method-heading">
196
- <a href="#M000018" class="method-signature">
197
- <span class="method-name">log</span><span class="method-args">(msg)</span>
198
- </a>
199
- </div>
200
-
201
- <div class="method-description">
202
- <p>
203
- Puts the message if we are in verbose mode (but not in silent mode).
204
- </p>
205
- <p><a class="source-toggle" href="#"
206
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
207
- <div class="method-source-code" id="M000018-source">
208
- <pre>
209
- <span class="ruby-comment cmt"># File lib/hel/tool.rb, line 30</span>
210
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">msg</span>)
211
- <span class="ruby-identifier">puts</span> <span class="ruby-identifier">msg</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@verbose</span>
212
- <span class="ruby-keyword kw">end</span>
213
- </pre>
214
- </div>
215
- </div>
216
- </div>
217
-
218
- <div id="method-M000017" class="method-detail">
219
- <a name="M000017"></a>
220
-
221
- <div class="method-heading">
222
- <a href="#M000017" class="method-signature">
223
- <span class="method-name">puts</span><span class="method-args">(msg)</span>
224
- </a>
225
- </div>
226
-
227
- <div class="method-description">
228
- <p>
229
- Puts the message unless we are in silent mode.
230
- </p>
231
- <p><a class="source-toggle" href="#"
232
- onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
233
- <div class="method-source-code" id="M000017-source">
234
- <pre>
235
- <span class="ruby-comment cmt"># File lib/hel/tool.rb, line 23</span>
236
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">puts</span>(<span class="ruby-identifier">msg</span>)
237
- <span class="ruby-ivar">@out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">msg</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@silent</span>
238
- <span class="ruby-keyword kw">end</span>
239
- </pre>
240
- </div>
241
- </div>
242
- </div>
243
-
244
- <div id="method-M000020" class="method-detail">
245
- <a name="M000020"></a>
246
-
247
- <div class="method-heading">
248
- <a href="#M000020" class="method-signature">
249
- <span class="method-name">to_disk</span><span class="method-args">(str)</span>
250
- </a>
251
- </div>
252
-
253
- <div class="method-description">
254
- <p>
255
- Write the requested string to the output file.
256
- </p>
257
- <p><a class="source-toggle" href="#"
258
- onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
259
- <div class="method-source-code" id="M000020-source">
260
- <pre>
261
- <span class="ruby-comment cmt"># File lib/hel/tool.rb, line 44</span>
262
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_disk</span>(<span class="ruby-identifier">str</span>)
263
- <span class="ruby-identifier">f</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-ivar">@output</span>, <span class="ruby-value str">&quot;w&quot;</span>)
264
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">str</span>
265
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">flush</span>
266
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>
267
-
268
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Saved result to #{File.expand_path(@output)}.&quot;</span>
269
- <span class="ruby-keyword kw">end</span>
270
- </pre>
271
- </div>
272
- </div>
273
- </div>
274
-
275
- <div id="method-M000019" class="method-detail">
276
- <a name="M000019"></a>
277
-
278
- <div class="method-heading">
279
- <a href="#M000019" class="method-signature">
280
- <span class="method-name">valid_opts</span><span class="method-args">()</span>
281
- </a>
282
- </div>
283
-
284
- <div class="method-description">
285
- <p>
286
- Validates the opts the tool has been invoked with.
287
- </p>
288
- <p><a class="source-toggle" href="#"
289
- onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
290
- <div class="method-source-code" id="M000019-source">
291
- <pre>
292
- <span class="ruby-comment cmt"># File lib/hel/tool.rb, line 37</span>
293
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_opts</span>
294
- <span class="ruby-keyword kw">true</span>
295
- <span class="ruby-keyword kw">end</span>
296
- </pre>
297
- </div>
298
- </div>
299
- </div>
300
-
301
-
302
- </div>
303
-
304
-
305
- </div>
306
-
307
-
308
- <div id="validator-badges">
309
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
310
- </div>
311
-
312
- </body>
313
- </html>