nasldoc 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. data/LICENSE +3 -3
  2. data/NEWS.markdown +9 -5
  3. data/README.markdown +38 -41
  4. data/Rakefile +49 -3
  5. data/TODO.markdown +20 -0
  6. data/bin/nasldoc +27 -1
  7. data/lib/nasldoc.rb +27 -1
  8. data/lib/nasldoc/assets/css/bootstrap.css +6004 -0
  9. data/lib/nasldoc/assets/css/bootstrap.min.css +859 -0
  10. data/lib/nasldoc/assets/css/shCore.css +226 -0
  11. data/lib/nasldoc/assets/css/shThemeDefault.css +117 -0
  12. data/lib/nasldoc/assets/{stylesheet.css → css/stylesheet.css} +37 -15
  13. data/lib/nasldoc/assets/img/glyphicons-halflings-white.png +0 -0
  14. data/lib/nasldoc/assets/img/glyphicons-halflings.png +0 -0
  15. data/lib/nasldoc/assets/{nessus.jpg → img/nessus.jpg} +0 -0
  16. data/lib/nasldoc/assets/js/bootstrap.js +2036 -0
  17. data/lib/nasldoc/assets/js/bootstrap.min.js +7 -0
  18. data/lib/nasldoc/assets/js/jquery-1.8.2.js +9440 -0
  19. data/lib/nasldoc/assets/js/shBrushNasl.js +33 -0
  20. data/lib/nasldoc/assets/js/shCore.js +17 -0
  21. data/lib/nasldoc/cli.rb +26 -0
  22. data/lib/nasldoc/cli/application.rb +150 -222
  23. data/lib/nasldoc/cli/comment.rb +317 -0
  24. data/lib/nasldoc/templates/file.erb +362 -154
  25. data/lib/nasldoc/templates/index.erb +93 -9
  26. data/lib/nasldoc/templates/old/file.erb +332 -0
  27. data/lib/nasldoc/templates/old/xfile.erb +267 -0
  28. data/lib/nasldoc/templates/old/xindex.erb +16 -0
  29. data/lib/nasldoc/templates/old/xoverview.erb +26 -0
  30. data/lib/nasldoc/templates/old/xsidebar.erb +21 -0
  31. data/lib/nasldoc/templates/xindex.erb +16 -0
  32. data/nasldoc.gemspec +45 -18
  33. metadata +45 -13
  34. data/lib/nasldoc/templates/overview.erb +0 -27
  35. data/lib/nasldoc/templates/sidebar.erb +0 -20
@@ -1,12 +1,96 @@
1
- <html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
2
3
  <head>
3
- <title>nasldoc</title>
4
- <link rel = 'stylesheet' type= 'text/css' href='stylesheet.css'>
4
+ <meta charset="utf-8">
5
+ <title>nasldoc: nasl</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <meta name="description" content="">
8
+ <meta name="author" content="">
9
+
10
+ <!-- Le styles -->
11
+ <link href="css/bootstrap.css" rel="stylesheet">
12
+ <style type="text/css">
13
+ body {
14
+ padding-top: 60px;
15
+ padding-bottom: 40px;
16
+ }
17
+ .sidebar-nav {
18
+ padding: 9px 0;
19
+ }
20
+ </style>
21
+ <link href="css/bootstrap.min.css" rel="stylesheet">
22
+
23
+ <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
24
+ <!--[if lt IE 9]>
25
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
26
+ <![endif]-->
27
+
28
+ <!-- Fav and touch icons -->
29
+ <link rel="shortcut icon" href="ico/favicon.ico">
30
+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png">
31
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png">
32
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png">
33
+ <link rel="apple-touch-icon-precomposed" href="ico/apple-touch-icon-57-precomposed.png">
5
34
  </head>
6
- <frameset cols='20%,80%'>
7
- <frame name='sidebar' src='sidebar.html'>
8
- <frameset rows='100%'>
9
- <frame name='content' src='overview.html'>
10
- </frameset>
11
- </frameset>
35
+
36
+ <body>
37
+
38
+ <div class="navbar navbar-inverse navbar-fixed-top">
39
+ <div class="navbar-inner">
40
+ <div class="container-fluid">
41
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
42
+ <span class="icon-bar"></span>
43
+ <span class="icon-bar"></span>
44
+ <span class="icon-bar"></span>
45
+ </a>
46
+ <a class="brand" href="index.html">nasldoc</a>
47
+ <div class="nav-collapse collapse">
48
+ <ul class="nav">
49
+ <li class="active"><a href="index.html">Home</a></li>
50
+ </ul>
51
+ </div><!--/.nav-collapse -->
52
+ </div>
53
+ </div>
54
+ </div>
55
+
56
+ <div class="container-fluid">
57
+ <div class="row-fluid">
58
+ <div class="span3">
59
+ <div class="well sidebar-nav">
60
+ <ul class="nav nav-list">
61
+ <% @file_list.each_with_index do |file, i| %>
62
+ <% row = i.even? ? 'even' : 'odd' %>
63
+ <% link = url(file) %>
64
+ <li class="<%= row %>">
65
+ <a href="<%= link %>"><%= link.gsub('.html', '.inc') %></a>
66
+ </li>
67
+ <% end %>
68
+ </ul>
69
+ </div><!--/.well -->
70
+ </div><!--/span-->
71
+ <div class="span9">
72
+ <div class="hero-unit">
73
+ <h1>Welcome to nasldoc!</h1>
74
+ <p>Select a file to view the docs!</p>
75
+ <p><a class="btn btn-primary btn-large">Learn more &raquo;</a></p>
76
+ </div>
77
+ <div class="row-fluid">
78
+ </div><!--/row-->
79
+ </div><!--/span-->
80
+ </div><!--/row-->
81
+
82
+ <hr>
83
+
84
+ <footer>
85
+ <p>&copy; Tenable Network Security 2013</p>
86
+ </footer>
87
+
88
+ </div><!--/.fluid-container-->
89
+
90
+ <!-- Le javascript
91
+ ================================================== -->
92
+ <!-- Placed at the end of the document so the pages load faster -->
93
+ <script src="js/jquery.js"></script>
94
+ <script src="js/bootstrap.min.js"></script>
95
+ </body>
12
96
  </html>
@@ -0,0 +1,332 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>nasldoc: nasl</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <meta name="description" content="">
8
+ <meta name="author" content="">
9
+
10
+ <!-- Le styles -->
11
+ <link href="assets/css/bootstrap.css" rel="stylesheet">
12
+ <style type="text/css">
13
+ body {
14
+ padding-top: 60px;
15
+ padding-bottom: 40px;
16
+ }
17
+ .sidebar-nav {
18
+ padding: 9px 0;
19
+ }
20
+ </style>
21
+ <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
22
+
23
+ <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
24
+ <!--[if lt IE 9]>
25
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
26
+ <![endif]-->
27
+
28
+ <!-- Fav and touch icons -->
29
+ <link rel="shortcut icon" href="assets/ico/favicon.ico">
30
+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
31
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
32
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
33
+ <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
34
+ </head>
35
+
36
+ <body>
37
+
38
+ <div class="navbar navbar-inverse navbar-fixed-top">
39
+ <div class="navbar-inner">
40
+ <div class="container-fluid">
41
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
42
+ <span class="icon-bar"></span>
43
+ <span class="icon-bar"></span>
44
+ <span class="icon-bar"></span>
45
+ </a>
46
+ <a class="brand" href="#">nasldoc</a>
47
+ <div class="nav-collapse collapse">
48
+ <ul class="nav">
49
+ <li class="active"><a href="#">Home</a></li>
50
+ </ul>
51
+ </div><!--/.nav-collapse -->
52
+ </div>
53
+ </div>
54
+ </div>
55
+
56
+ <div class="container-fluid">
57
+ <div class="row-fluid">
58
+ <div class="span3">
59
+ <div class="well sidebar-nav">
60
+ <ul class="nav nav-list">
61
+ <% @file_list.sort.each_with_index do |file, i| %>
62
+ <% row = i.even? ? 'even' : 'odd' %>
63
+ <% link = url(file) %>
64
+ <li class="<%= row %>">
65
+ <a href="<%= link %>" target="content"><%= link %></a>
66
+ </li>
67
+ <% end %>
68
+ </ul>
69
+ </div><!--/.well -->
70
+ </div><!--/span-->
71
+ <div class="span9">
72
+
73
+ <a name="top"></a>
74
+ <h1>Overview of <%= @current_file %></h1>
75
+ <% unless @overview.nil? %>
76
+ <% unless @overview.summary.nil? %>
77
+ <p class="summary"><%= @overview.summary %></p>
78
+ <% end %>
79
+ <% @overview.description.each do |paragraph| %>
80
+ <p class="description"><%= paragraph %></p>
81
+ <% end %>
82
+
83
+ <% if @overview.signed %>
84
+ <h1>Signed</h1>
85
+ <p>This library contains a signature, indicating that it is permitted to
86
+ call trusted builtin functions.</p>
87
+ <p class="warning">The signature on this library has not been checked, so
88
+ there is no guarantee it will run in Nessus.</p>
89
+ <% end %>
90
+
91
+ <% unless @overview.includes.empty? %>
92
+ <h1>Required Includes</h1>
93
+ <p>These files must be included by the importing code.</p>
94
+ <ul>
95
+ <% @overview.includes.sort.each do |inc| %>
96
+ <li><a href="<%= url(inc) %>"><%= inc %></a></li>
97
+ <% end %>
98
+ </ul>
99
+ <% end %>
100
+ <% end %>
101
+
102
+ <% unless @includes.empty? %>
103
+ <h1>Automatic Includes</h1>
104
+ <p>These files are automatically included by the library.</p>
105
+ <ul>
106
+ <% @includes.sort.each do |inc| %>
107
+ <li><a href="<%= url(inc) %>"><%= inc %></a></li>
108
+ <% end %>
109
+ </ul>
110
+ <% end %>
111
+
112
+ <% {Public: @globs_pub, Private: @globs_prv}.each do |name, list| %>
113
+ <% unless list.empty? %>
114
+ <h1><%= name %> Variable Summary</h1>
115
+
116
+ <% if name == :Public %>
117
+ <p>Public variables are intended to be accessed by the code that imports
118
+ this library.</p>
119
+ <% else %>
120
+ <p>Private variables are not intended to be accessed by the code that
121
+ imports this library. There is no functional difference between private
122
+ and public variables, only convention, and they may be accessed as
123
+ normal. </p>
124
+ <% end %>
125
+
126
+ <table class="nopad">
127
+ <tr class="TableHeadingColor">
128
+ <th>Name</th>
129
+ <th>Summary</th>
130
+ </tr>
131
+ <% list.sort.each do |name| %>
132
+ <tr>
133
+ <td><a href="#<%= name %>"><%= name %></a></td>
134
+ <td><%= safe(comment(name, :global), "", :summary) %></td>
135
+ </tr>
136
+ <% end %>
137
+ </table>
138
+ <% end %>
139
+ <% end %>
140
+
141
+ <% {Public: @funcs_pub, Private: @funcs_prv}.each do |name, list| %>
142
+ <% unless list.empty? %>
143
+ <h1><%= name %> Function Summary</h1>
144
+
145
+ <% if name == :Public %>
146
+ <p>Public functions are intended to be called by the code that imports
147
+ this library.</p>
148
+ <% else %>
149
+ <p>Private functions are not intended to be called by the code that
150
+ imports this library. There is no functional difference between private
151
+ and public functions, only convention, and they may be called as
152
+ normal. </p>
153
+ <% end %>
154
+
155
+ <table class="nopad">
156
+ <tr class="TableHeadingColor">
157
+ <th>Name</th>
158
+ <th>Summary</th>
159
+ </tr>
160
+ <% list.keys.sort.each do |name| %>
161
+ <tr>
162
+ <td><a href="#<%= name %>"><%= name %></a></td>
163
+ <td><%= safe(comment(name, :function), "", :summary) %></td>
164
+ </tr>
165
+ <% end %>
166
+ </table>
167
+ <% end %>
168
+ <% end %>
169
+
170
+ <% {Public: @globs_pub, Private: @globs_prv}.each do |name, list| %>
171
+ <% unless list.empty? %>
172
+ <h1><%= name %> Variable Details</h1>
173
+ <% list.sort.each do |name| %>
174
+ <h2 id="<%= name %>"><%= name %></h2>
175
+ <% comm = comment(name, :global) %>
176
+
177
+ <% unless comm.nil? %>
178
+ <% unless comm.summary.nil? %>
179
+ <h3>Summary</h3>
180
+ <p class="summary"><%= comm.summary %></p>
181
+ <% end %>
182
+
183
+ <% unless comm.description.empty? %>
184
+ <h3>Description</h3>
185
+ <% comm.description.each do |para| %>
186
+ <p class="description"><%= para %></p>
187
+ <% end %>
188
+ <% end %>
189
+
190
+ <% unless comm.remarks.empty? %>
191
+ <h3>Remarks</h3>
192
+ <% comm.remarks.each do |rem| %>
193
+ <p class="remark"><%= rem %></p>
194
+ <% end %>
195
+ <% end %>
196
+
197
+ <% unless comm.deprecated.nil? %>
198
+ <h3>Deprecated</h3>
199
+ <p class="deprecated"><%= comm.deprecated %></p>
200
+ <% end %>
201
+
202
+ <% unless comm.nessus.nil? %>
203
+ <h3>Nessus Version</h3>
204
+ <p class="nessus"><%= comm.nessus %></p>
205
+ <% end %>
206
+
207
+ <% unless comm.categories.empty? %>
208
+ <h3>Categories</h3>
209
+ <ul>
210
+ <% comm.categories.sort.each do |cat| %>
211
+ <li><%= cat %></li>
212
+ <% end %>
213
+ </ul>
214
+ <% end %>
215
+ <% end %>
216
+
217
+ <a href="#top">top</a>
218
+ <hr>
219
+ <% end %>
220
+ <% end %>
221
+ <% end %>
222
+
223
+ <% {Public: @funcs_pub, Private: @funcs_prv}.each do |name, list| %>
224
+ <% unless list.empty? %>
225
+ <h1><%= name %> Function Details</h1>
226
+ <% list.keys.sort.each do |name| %>
227
+ <h2 id="<%= name %>"><%= name %></h2>
228
+ <% comm = comment(name, :function) %>
229
+
230
+ <% unless comm.nil? %>
231
+ <% unless comm.summary.nil? %>
232
+ <h3>Summary</h3>
233
+ <p class="summary"><%= comm.summary %></p>
234
+ <% end %>
235
+
236
+ <% unless comm.description.empty? %>
237
+ <h3>Description</h3>
238
+ <% comm.description.each do |para| %>
239
+ <p class="description"><%= para %></p>
240
+ <% end %>
241
+ <% end %>
242
+
243
+ <% unless comm.remarks.empty? %>
244
+ <h3>Remarks</h3>
245
+ <% comm.remarks.each do |rem| %>
246
+ <p class="remark"><%= rem %></p>
247
+ <% end %>
248
+ <% end %>
249
+
250
+ <% unless comm.deprecated.nil? %>
251
+ <h3>Deprecated</h3>
252
+ <p class="deprecated"><%= comm.deprecated %></p>
253
+ <% end %>
254
+
255
+ <% unless comm.nessus.nil? %>
256
+ <h3>Nessus Version</h3>
257
+ <p class="nessus"><%= comm.nessus %></p>
258
+ <% end %>
259
+
260
+ <% unless comm.categories.empty? %>
261
+ <h3>Categories</h3>
262
+ <ul>
263
+ <% comm.categories.sort.each do |cat| %>
264
+ <li><%= cat %></li>
265
+ <% end %>
266
+ </ul>
267
+ <% end %>
268
+
269
+ <% unless comm.anonparams.empty? %>
270
+ <h3>Anonymous Parameters</h3>
271
+ <dl>
272
+ <% comm.anonparams.sort.each do |name, block| %>
273
+ <dt><%= name %></dt>
274
+ <dd><%= block %></dd>
275
+ <% end %>
276
+ </dl>
277
+ <% end %>
278
+ <% end %>
279
+
280
+ <% unless @functions[name].nil? || @functions[name].empty? %>
281
+ <h3>Named Parameters</h3>
282
+ <dl>
283
+ <% @functions[name].sort.each do |name| %>
284
+ <dt><%= name %></dt>
285
+ <% unless comm.nil? || !comm.params.has_key?(name) %>
286
+ <dd><%= comm.params[name] %></dd>
287
+ <% end %>
288
+ <% end %>
289
+ </dl>
290
+ <% end %>
291
+
292
+ <% unless comm.nil? || comm.return.nil? %>
293
+ <h3>Return Value</h3>
294
+ <p class="return"><%= comm.return %></p>
295
+ <% end %>
296
+
297
+ <a href="#top">top</a>
298
+ <hr>
299
+ <% end %>
300
+ <% end %>
301
+ <% end %>
302
+
303
+ </div><!--/span-->
304
+ </div><!--/row-->
305
+
306
+ <hr>
307
+
308
+ <footer>
309
+ <p>&copy; Company 2012</p>
310
+ </footer>
311
+
312
+ </div><!--/.fluid-container-->
313
+
314
+ <!-- Le javascript
315
+ ================================================== -->
316
+ <!-- Placed at the end of the document so the pages load faster -->
317
+ <script src="assets/js/jquery.js"></script>
318
+ <script src="assets/js/bootstrap-transition.js"></script>
319
+ <script src="assets/js/bootstrap-alert.js"></script>
320
+ <script src="assets/js/bootstrap-modal.js"></script>
321
+ <script src="assets/js/bootstrap-dropdown.js"></script>
322
+ <script src="assets/js/bootstrap-scrollspy.js"></script>
323
+ <script src="assets/js/bootstrap-tab.js"></script>
324
+ <script src="assets/js/bootstrap-tooltip.js"></script>
325
+ <script src="assets/js/bootstrap-popover.js"></script>
326
+ <script src="assets/js/bootstrap-button.js"></script>
327
+ <script src="assets/js/bootstrap-collapse.js"></script>
328
+ <script src="assets/js/bootstrap-carousel.js"></script>
329
+ <script src="assets/js/bootstrap-typeahead.js"></script>
330
+
331
+ </body>
332
+ </html>
@@ -0,0 +1,267 @@
1
+ <%
2
+ def comment(name, type)
3
+ filter1 = proc { |c| c.type == type }
4
+
5
+ filter2 = case type
6
+ when :export, :function
7
+ Proc.new { |c| c.function == name }
8
+ when :file
9
+ Proc.new { |c| true }
10
+ when :global
11
+ Proc.new { |c| c.variables.include? name }
12
+ end
13
+
14
+ @comments.select(&filter1).select(&filter2).shift
15
+ end
16
+ %>
17
+
18
+ <%
19
+ def safe(obj, default, *attrs)
20
+ attrs.each do |attr|
21
+ return default unless obj.respond_to? attr
22
+ obj = obj.send(attr)
23
+ end
24
+
25
+ obj
26
+ end
27
+ %>
28
+
29
+ <html>
30
+ <head>
31
+ <title><%= @current_file %></title>
32
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
33
+ </head>
34
+ <body>
35
+ <div id="content">
36
+ <a name="top"></a>
37
+ <h1>Overview of <%= @current_file %></h1>
38
+ <% unless @overview.nil? %>
39
+ <% unless @overview.summary.nil? %>
40
+ <p class="summary"><%= @overview.summary %></p>
41
+ <% end %>
42
+ <% @overview.description.each do |paragraph| %>
43
+ <p class="description"><%= paragraph %></p>
44
+ <% end %>
45
+
46
+ <% if @overview.signed %>
47
+ <h1>Signed</h1>
48
+ <p>This library contains a signature, indicating that it is permitted to
49
+ call trusted builtin functions.</p>
50
+ <p class="warning">The signature on this library has not been checked, so
51
+ there is no guarantee it will run in Nessus.</p>
52
+ <% end %>
53
+
54
+ <% unless @overview.includes.empty? %>
55
+ <h1>Required Includes</h1>
56
+ <p>These files must be included by the importing code.</p>
57
+ <ul>
58
+ <% @overview.includes.sort.each do |inc| %>
59
+ <li><a href="<%= url(inc) %>"><%= inc %></a></li>
60
+ <% end %>
61
+ </ul>
62
+ <% end %>
63
+ <% end %>
64
+
65
+ <% unless @includes.empty? %>
66
+ <h1>Automatic Includes</h1>
67
+ <p>These files are automatically included by the library.</p>
68
+ <ul>
69
+ <% @includes.sort.each do |inc| %>
70
+ <li><a href="<%= url(inc) %>"><%= inc %></a></li>
71
+ <% end %>
72
+ </ul>
73
+ <% end %>
74
+
75
+ <% {Public: @globs_pub, Private: @globs_prv}.each do |name, list| %>
76
+ <% unless list.empty? %>
77
+ <h1><%= name %> Variable Summary</h1>
78
+
79
+ <% if name == :Public %>
80
+ <p>Public variables are intended to be accessed by the code that imports
81
+ this library.</p>
82
+ <% else %>
83
+ <p>Private variables are not intended to be accessed by the code that
84
+ imports this library. There is no functional difference between private
85
+ and public variables, only convention, and they may be accessed as
86
+ normal. </p>
87
+ <% end %>
88
+
89
+ <table class="nopad">
90
+ <tr class="TableHeadingColor">
91
+ <th>Name</th>
92
+ <th>Summary</th>
93
+ </tr>
94
+ <% list.sort.each do |name| %>
95
+ <tr>
96
+ <td><a href="#<%= name %>"><%= name %></a></td>
97
+ <td><%= safe(comment(name, :global), "", :summary) %></td>
98
+ </tr>
99
+ <% end %>
100
+ </table>
101
+ <% end %>
102
+ <% end %>
103
+
104
+ <% {Public: @funcs_pub, Private: @funcs_prv}.each do |name, list| %>
105
+ <% unless list.empty? %>
106
+ <h1><%= name %> Function Summary</h1>
107
+
108
+ <% if name == :Public %>
109
+ <p>Public functions are intended to be called by the code that imports
110
+ this library.</p>
111
+ <% else %>
112
+ <p>Private functions are not intended to be called by the code that
113
+ imports this library. There is no functional difference between private
114
+ and public functions, only convention, and they may be called as
115
+ normal. </p>
116
+ <% end %>
117
+
118
+ <table class="nopad">
119
+ <tr class="TableHeadingColor">
120
+ <th>Name</th>
121
+ <th>Summary</th>
122
+ </tr>
123
+ <% list.keys.sort.each do |name| %>
124
+ <tr>
125
+ <td><a href="#<%= name %>"><%= name %></a></td>
126
+ <td><%= safe(comment(name, :function), "", :summary) %></td>
127
+ </tr>
128
+ <% end %>
129
+ </table>
130
+ <% end %>
131
+ <% end %>
132
+
133
+ <% {Public: @globs_pub, Private: @globs_prv}.each do |name, list| %>
134
+ <% unless list.empty? %>
135
+ <h1><%= name %> Variable Details</h1>
136
+ <% list.sort.each do |name| %>
137
+ <h2 id="<%= name %>"><%= name %></h2>
138
+ <% comm = comment(name, :global) %>
139
+
140
+ <% unless comm.nil? %>
141
+ <% unless comm.summary.nil? %>
142
+ <h3>Summary</h3>
143
+ <p class="summary"><%= comm.summary %></p>
144
+ <% end %>
145
+
146
+ <% unless comm.description.empty? %>
147
+ <h3>Description</h3>
148
+ <% comm.description.each do |para| %>
149
+ <p class="description"><%= para %></p>
150
+ <% end %>
151
+ <% end %>
152
+
153
+ <% unless comm.remarks.empty? %>
154
+ <h3>Remarks</h3>
155
+ <% comm.remarks.each do |rem| %>
156
+ <p class="remark"><%= rem %></p>
157
+ <% end %>
158
+ <% end %>
159
+
160
+ <% unless comm.deprecated.nil? %>
161
+ <h3>Deprecated</h3>
162
+ <p class="deprecated"><%= comm.deprecated %></p>
163
+ <% end %>
164
+
165
+ <% unless comm.nessus.nil? %>
166
+ <h3>Nessus Version</h3>
167
+ <p class="nessus"><%= comm.nessus %></p>
168
+ <% end %>
169
+
170
+ <% unless comm.categories.empty? %>
171
+ <h3>Categories</h3>
172
+ <ul>
173
+ <% comm.categories.sort.each do |cat| %>
174
+ <li><%= cat %></li>
175
+ <% end %>
176
+ </ul>
177
+ <% end %>
178
+ <% end %>
179
+
180
+ <a href="#top">top</a>
181
+ <hr>
182
+ <% end %>
183
+ <% end %>
184
+ <% end %>
185
+
186
+ <% {Public: @funcs_pub, Private: @funcs_prv}.each do |name, list| %>
187
+ <% unless list.empty? %>
188
+ <h1><%= name %> Function Details</h1>
189
+ <% list.keys.sort.each do |name| %>
190
+ <h2 id="<%= name %>"><%= name %></h2>
191
+ <% comm = comment(name, :function) %>
192
+
193
+ <% unless comm.nil? %>
194
+ <% unless comm.summary.nil? %>
195
+ <h3>Summary</h3>
196
+ <p class="summary"><%= comm.summary %></p>
197
+ <% end %>
198
+
199
+ <% unless comm.description.empty? %>
200
+ <h3>Description</h3>
201
+ <% comm.description.each do |para| %>
202
+ <p class="description"><%= para %></p>
203
+ <% end %>
204
+ <% end %>
205
+
206
+ <% unless comm.remarks.empty? %>
207
+ <h3>Remarks</h3>
208
+ <% comm.remarks.each do |rem| %>
209
+ <p class="remark"><%= rem %></p>
210
+ <% end %>
211
+ <% end %>
212
+
213
+ <% unless comm.deprecated.nil? %>
214
+ <h3>Deprecated</h3>
215
+ <p class="deprecated"><%= comm.deprecated %></p>
216
+ <% end %>
217
+
218
+ <% unless comm.nessus.nil? %>
219
+ <h3>Nessus Version</h3>
220
+ <p class="nessus"><%= comm.nessus %></p>
221
+ <% end %>
222
+
223
+ <% unless comm.categories.empty? %>
224
+ <h3>Categories</h3>
225
+ <ul>
226
+ <% comm.categories.sort.each do |cat| %>
227
+ <li><%= cat %></li>
228
+ <% end %>
229
+ </ul>
230
+ <% end %>
231
+
232
+ <% unless comm.anonparams.empty? %>
233
+ <h3>Anonymous Parameters</h3>
234
+ <dl>
235
+ <% comm.anonparams.sort.each do |name, block| %>
236
+ <dt><%= name %></dt>
237
+ <dd><%= block %></dd>
238
+ <% end %>
239
+ </dl>
240
+ <% end %>
241
+ <% end %>
242
+
243
+ <% unless @functions[name].nil? || @functions[name].empty? %>
244
+ <h3>Named Parameters</h3>
245
+ <dl>
246
+ <% @functions[name].sort.each do |name| %>
247
+ <dt><%= name %></dt>
248
+ <% unless comm.nil? || !comm.params.has_key?(name) %>
249
+ <dd><%= comm.params[name] %></dd>
250
+ <% end %>
251
+ <% end %>
252
+ </dl>
253
+ <% end %>
254
+
255
+ <% unless comm.nil? || comm.return.nil? %>
256
+ <h3>Return Value</h3>
257
+ <p class="return"><%= comm.return %></p>
258
+ <% end %>
259
+
260
+ <a href="#top">top</a>
261
+ <hr>
262
+ <% end %>
263
+ <% end %>
264
+ <% end %>
265
+ </div>
266
+ </body>
267
+ </html>