ruby-vpi 11.1.1 → 12.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/generate_test.rb +12 -11
- data/bin/generate_test_tpl/bench.rb +0 -4
- data/bin/generate_test_tpl/bench.v +3 -6
- data/bin/generate_test_tpl/runner.rake +20 -4
- data/bin/generate_test_tpl/spec.rb +5 -7
- data/doc/common.css +110 -95
- data/doc/common.tpl +16 -17
- data/doc/history.html +350 -330
- data/doc/history.yml +49 -0
- data/doc/intro.inc +18 -4
- data/doc/lib/doc_proxy.rb +22 -32
- data/doc/manual.erb +90 -83
- data/doc/manual.html +298 -266
- data/doc/memo.html +31 -10
- data/doc/readme.html +26 -6
- data/ext/relay.c +24 -28
- data/ext/vlog.c +4 -15
- data/lib/ruby-vpi/rspec.rb +1 -1
- data/lib/ruby-vpi/runner.rb +12 -10
- data/lib/ruby-vpi/runner_proxy.rb +17 -6
- data/lib/ruby-vpi/verilog_parser.rb +11 -7
- data/lib/ruby-vpi/vpi.rb +11 -1
- data/lib/ruby-vpi.rb +4 -0
- data/ref/c/annotated.html +2 -2
- data/ref/c/common_8h.html +1 -1
- data/ref/c/files.html +1 -1
- data/ref/c/functions.html +1 -1
- data/ref/c/functions_vars.html +1 -1
- data/ref/c/globals.html +1 -1
- data/ref/c/globals_0x63.html +1 -1
- data/ref/c/globals_0x65.html +1 -1
- data/ref/c/globals_0x66.html +1 -1
- data/ref/c/globals_0x70.html +1 -1
- data/ref/c/globals_0x72.html +1 -1
- data/ref/c/globals_0x73.html +1 -1
- data/ref/c/globals_0x74.html +1 -1
- data/ref/c/globals_0x76.html +2 -2
- data/ref/c/globals_0x78.html +1 -1
- data/ref/c/globals_defs.html +1 -1
- data/ref/c/globals_defs_0x65.html +1 -1
- data/ref/c/globals_defs_0x70.html +1 -1
- data/ref/c/globals_defs_0x76.html +2 -2
- data/ref/c/globals_defs_0x78.html +1 -1
- data/ref/c/globals_enum.html +1 -1
- data/ref/c/globals_eval.html +1 -1
- data/ref/c/globals_func.html +2 -2
- data/ref/c/globals_type.html +1 -1
- data/ref/c/globals_vars.html +1 -1
- data/ref/c/index.html +1 -1
- data/ref/c/relay_8c.html +2 -1
- data/ref/c/relay_8h.html +1 -1
- data/ref/c/structrelay____RubyOptions____def.html +8 -2
- data/ref/c/structt__cb__data.html +1 -1
- data/ref/c/structt__vpi__delay.html +1 -1
- data/ref/c/structt__vpi__error__info.html +1 -1
- data/ref/c/structt__vpi__strengthval.html +1 -1
- data/ref/c/structt__vpi__systf__data.html +1 -1
- data/ref/c/structt__vpi__time.html +1 -1
- data/ref/c/structt__vpi__value.html +1 -1
- data/ref/c/structt__vpi__vecval.html +1 -1
- data/ref/c/structt__vpi__vlog__info.html +1 -1
- data/ref/c/swig_8c.html +1 -1
- data/ref/c/swig_8h.html +1 -1
- data/ref/c/verilog_8h.html +1 -1
- data/ref/c/vlog_8c.html +15 -15
- data/ref/c/vlog_8h.html +1 -1
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/OutputInfo.html +1 -1
- data/ref/ruby/classes/OutputInfo.src/M000030.html +30 -30
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000097.html → M000099.html} +0 -0
- data/ref/ruby/classes/RubyVpi.src/M000085.html +43 -39
- data/ref/ruby/classes/String.src/M000033.html +26 -26
- data/ref/ruby/classes/String.src/M000034.html +4 -4
- data/ref/ruby/classes/Template.src/M000032.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000011.html +5 -5
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000007.html +7 -7
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000009.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000010.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module.src/M000006.html +15 -11
- data/ref/ruby/classes/Vpi/Handle/Property.html +5 -5
- data/ref/ruby/classes/Vpi/Handle/Property.src/{M000096.html → M000098.html} +61 -61
- data/ref/ruby/classes/Vpi/Handle.html +78 -43
- data/ref/ruby/classes/Vpi/Handle.src/M000088.html +3 -3
- data/ref/ruby/classes/Vpi/Handle.src/M000089.html +4 -8
- data/ref/ruby/classes/Vpi/Handle.src/M000090.html +5 -31
- data/ref/ruby/classes/Vpi/Handle.src/M000091.html +9 -74
- data/ref/ruby/classes/Vpi/Handle.src/M000092.html +31 -17
- data/ref/ruby/classes/Vpi/Handle.src/M000093.html +74 -11
- data/ref/ruby/classes/Vpi/Handle.src/M000094.html +30 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000095.html +11 -55
- data/ref/ruby/classes/Vpi/Handle.src/M000097.html +68 -0
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/generate_test_rb.html +8 -11
- data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +4 -4
- data/ref/ruby/files/bin/generate_test_rb.src/M000002.html +22 -24
- data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/float_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +2 -2
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000003.html +10 -10
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000004.html +12 -12
- data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -1
- data/ref/ruby/fr_method_index.html +20 -18
- data/samp/counter/counter_rspec_bench.v +3 -6
- data/samp/counter/counter_rspec_design.rb +2 -1
- data/samp/counter/counter_rspec_runner.rake +20 -4
- data/samp/counter/counter_rspec_spec.rb +4 -4
- data/samp/counter/counter_xunit_bench.v +3 -6
- data/samp/counter/counter_xunit_design.rb +2 -1
- data/samp/counter/counter_xunit_runner.rake +20 -4
- data/samp/pipelined_alu/hw5_unit_test_bench.v +3 -6
- data/samp/pipelined_alu/hw5_unit_test_runner.rake +20 -4
- metadata +21 -20
- data/doc/manual.rb +0 -5
data/bin/generate_test.rb
CHANGED
@@ -5,13 +5,12 @@
|
|
5
5
|
#
|
6
6
|
# = Progress indicators
|
7
7
|
# module:: A Verilog module has been identified.
|
8
|
-
# backup:: A backup copy of a file is being made.
|
9
8
|
# create:: A file is being created because it does not exist.
|
10
9
|
# skip:: A file is being skipped because it is already up to date.
|
11
|
-
# update:: A file will be updated because it is out of date. A
|
10
|
+
# update:: A file will be updated because it is out of date. A text merging tool (see MERGER) will be launched to transfer content from the old file (*.old) and the new file (*.new) to the out of date file. If a text merging tool is not specified, then you will have to do the merging by hand.
|
12
11
|
#
|
13
12
|
# = Environment variables
|
14
|
-
# MERGER:: A command that invokes a text merging tool with
|
13
|
+
# MERGER:: A command that invokes a text merging tool with three arguments: (1) old file, (2) new file, (3) output file. The tool's output should be written to the output file.
|
15
14
|
|
16
15
|
|
17
16
|
=begin
|
@@ -53,16 +52,14 @@ def write_file aPath, aContent
|
|
53
52
|
if oldDigest == newDigest
|
54
53
|
notify :skip, aPath
|
55
54
|
else
|
56
|
-
old, new = "#{aPath}.old", aPath
|
57
|
-
|
58
|
-
notify :backup, old
|
59
|
-
FileUtils.cp aPath, old, :preserve => true
|
60
|
-
|
61
55
|
notify :update, aPath
|
56
|
+
cur, old, new = aPath, "#{aPath}.old", "#{aPath}.new"
|
57
|
+
|
58
|
+
FileUtils.cp cur, old, :preserve => true
|
62
59
|
File.open(new, 'w') {|f| f << aContent}
|
63
60
|
|
64
61
|
if m = ENV['MERGER']
|
65
|
-
system "#{m} #{old.inspect} #{new.inspect}"
|
62
|
+
system "#{m} #{old.inspect} #{new.inspect} #{cur.inspect}"
|
66
63
|
end
|
67
64
|
end
|
68
65
|
else
|
@@ -91,7 +88,7 @@ class OutputInfo
|
|
91
88
|
VERILOG_EXT = '.v'
|
92
89
|
RUNNER_EXT = '.rake'
|
93
90
|
|
94
|
-
SPEC_FORMATS = [:rSpec, :xUnit, :generic]
|
91
|
+
SPEC_FORMATS = [:rSpec, :tSpec, :xUnit, :generic]
|
95
92
|
|
96
93
|
attr_reader :verilogBenchName, :verilogBenchPath, :rubyBenchName, :rubyBenchPath, :designName, :designClassName, :designPath, :specName, :specClassName, :specFormat, :specPath, :rubyVpiPath, :runnerName, :runnerPath, :protoName, :protoPath
|
97
94
|
|
@@ -163,7 +160,7 @@ if File.basename($0) == File.basename(__FILE__)
|
|
163
160
|
exit
|
164
161
|
end
|
165
162
|
|
166
|
-
opts.on '--xunit', 'use xUnit specification format' do |val|
|
163
|
+
opts.on '--xunit', '--test-unit', 'use xUnit (Test::Unit) specification format' do |val|
|
167
164
|
optSpecFmt = :xUnit if val
|
168
165
|
end
|
169
166
|
|
@@ -171,6 +168,10 @@ if File.basename($0) == File.basename(__FILE__)
|
|
171
168
|
optSpecFmt = :rSpec if val
|
172
169
|
end
|
173
170
|
|
171
|
+
opts.on '--tspec', '--test-spec', 'use test/spec specification format' do |val|
|
172
|
+
optSpecFmt = :tSpec if val
|
173
|
+
end
|
174
|
+
|
174
175
|
opts.on '-n', '--name NAME', 'insert NAME into the names of generated files' do |val|
|
175
176
|
optTestName = val
|
176
177
|
end
|
@@ -30,16 +30,13 @@ module <%= aOutputInfo.verilogBenchName %>;
|
|
30
30
|
|
31
31
|
// connect to the Ruby side of this bench
|
32
32
|
initial begin
|
33
|
-
<%=
|
34
|
-
$ruby_init("ruby", "-w", "-rubygems", <%= aOutputInfo.rubyBenchPath.inspect %>);
|
33
|
+
$ruby_init("ruby", "-rubygems", <%= aOutputInfo.rubyBenchPath.inspect %>);
|
35
34
|
end
|
36
35
|
|
37
36
|
always begin
|
38
|
-
#
|
39
|
-
end
|
40
|
-
|
41
|
-
always @(posedge <%= clockSignal %>) begin
|
37
|
+
#1 <%= clockSignal %> = 0;
|
42
38
|
#1 $ruby_relay;
|
39
|
+
#1 <%= clockSignal %> = 1;
|
43
40
|
end
|
44
41
|
|
45
42
|
endmodule
|
@@ -1,21 +1,27 @@
|
|
1
1
|
# This file runs the test.
|
2
2
|
|
3
|
-
# These are source files that
|
3
|
+
# These are Verilog source files that need to be loaded
|
4
|
+
# by the simulator before they can be simulated.
|
4
5
|
SIMULATOR_SOURCES = [
|
5
6
|
'<%= aModuleInfo.name %>.v',
|
6
7
|
'<%= aOutputInfo.verilogBenchPath %>',
|
7
8
|
]
|
8
9
|
|
9
10
|
# These are paths to directories which contain the
|
10
|
-
# sources listed above,
|
11
|
+
# sources listed above, the files they `include, or both.
|
11
12
|
SIMULATOR_INCLUDES = []
|
12
13
|
|
13
14
|
# This specifies the "top module" that is to be simulated.
|
14
15
|
SIMULATOR_TARGET = '<%= aOutputInfo.verilogBenchName %>'
|
15
16
|
|
16
17
|
# These are command-line arguments for the simulator.
|
17
|
-
# They can be specified as a string or an array of strings
|
18
|
-
|
18
|
+
# They can be specified as a string or an array of strings:
|
19
|
+
#
|
20
|
+
# :cver => "this is one single argument",
|
21
|
+
# :cver => ['these', 'are', 'separate', 'arguments'],
|
22
|
+
# :cver => %w[these are also separate arguments],
|
23
|
+
#
|
24
|
+
SIMULATOR_ARGUMENTS = {
|
19
25
|
# GPL Cver
|
20
26
|
:cver => '',
|
21
27
|
|
@@ -29,4 +35,14 @@ SIMULATOR_ARGS = {
|
|
29
35
|
:vsim => '',
|
30
36
|
}
|
31
37
|
|
38
|
+
# This task is invoked _before_ the simulator runs.
|
39
|
+
# It can be used to make preprations, such as converting
|
40
|
+
# Verilog header files into Ruby, for the simulation.
|
41
|
+
task :setup do
|
42
|
+
# To learn how to write Rake tasks, please see:
|
43
|
+
# http://docs.rubyrake.org/read/chapter/4#page16
|
44
|
+
end
|
45
|
+
|
46
|
+
# This command loads the Ruby-VPI runner template, which
|
47
|
+
# runs the simulator according to the information above.
|
32
48
|
require 'ruby-vpi/runner'
|
@@ -11,13 +11,14 @@ class <%= aOutputInfo.specClassName %> < Test::Unit::TestCase
|
|
11
11
|
<% aModuleInfo.ports.each do |port| %>
|
12
12
|
|
13
13
|
def test_<%= port.name %>
|
14
|
+
# assert <%= aOutputInfo.designClassName %>.<%= port.name %> ..., "<%= port.name %> should ..."
|
14
15
|
end
|
15
16
|
<% end %>
|
16
17
|
end
|
17
18
|
<%
|
18
|
-
when :rSpec
|
19
|
+
when :rSpec, :tSpec
|
19
20
|
%>
|
20
|
-
context "A
|
21
|
+
context "A resetted <%= aOutputInfo.designClassName %>" do
|
21
22
|
setup do
|
22
23
|
<%= aOutputInfo.designClassName %>.reset!
|
23
24
|
end
|
@@ -29,11 +30,8 @@ end
|
|
29
30
|
<%
|
30
31
|
else
|
31
32
|
%>
|
32
|
-
|
33
|
-
|
34
|
-
<%= aOutputInfo.designClassName %>.reset!
|
35
|
-
end
|
36
|
-
end
|
33
|
+
<%= aOutputInfo.designClassName %>.reset!
|
34
|
+
# raise "should ..." unless <%= aOutputInfo.designClassName %> ...
|
37
35
|
<%
|
38
36
|
end
|
39
37
|
%>
|
data/doc/common.css
CHANGED
@@ -2,141 +2,156 @@ body {
|
|
2
2
|
font-family: sans-serif;
|
3
3
|
line-height: 2em;
|
4
4
|
|
5
|
-
margin-left:
|
6
|
-
margin-right:
|
5
|
+
margin-left: 275px;
|
6
|
+
margin-right: 50px;
|
7
7
|
margin-bottom: 5em;
|
8
|
+
max-width: 600px;
|
8
9
|
}
|
9
10
|
|
11
|
+
|
10
12
|
/* headings */
|
11
|
-
th, h1, h2, h3, h4, h5, h6, .title {
|
12
|
-
font-family: serif;
|
13
|
-
}
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
}
|
14
|
+
th, h1, h2, h3, h4, h5, h6, .title {
|
15
|
+
font-family: serif;
|
16
|
+
}
|
19
17
|
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
h1, h2, h3, h4, h5, h6 {
|
19
|
+
margin-top: 5em;
|
20
|
+
padding: 0.5em;
|
21
|
+
}
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}
|
23
|
+
h1, h2, h3 {
|
24
|
+
text-align: center;
|
25
|
+
}
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
h1 {
|
28
|
+
padding: 1em;
|
29
|
+
background-color: mistyrose;
|
30
|
+
}
|
31
|
+
|
32
|
+
h2 {
|
33
|
+
background-color: bisque;
|
34
|
+
}
|
35
|
+
|
36
|
+
h3 {
|
37
|
+
background-color: oldlace;
|
38
|
+
}
|
32
39
|
|
33
|
-
h3 {
|
34
|
-
background-color: oldlace;
|
35
|
-
}
|
36
40
|
|
37
41
|
/* table of contents */
|
38
42
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
43
|
+
#navigation {
|
44
|
+
position: fixed;
|
45
|
+
left: 0px;
|
46
|
+
top: 0px;
|
47
|
+
bottom: 0px;
|
44
48
|
|
45
|
-
|
46
|
-
|
47
|
-
|
49
|
+
max-width: 200px;
|
50
|
+
padding: 1em;
|
51
|
+
overflow: auto;
|
48
52
|
|
49
|
-
|
50
|
-
|
53
|
+
background-color: white;
|
54
|
+
}
|
51
55
|
|
52
|
-
|
53
|
-
|
54
|
-
|
56
|
+
#navigation h1, #navigation h2, #navigation h3, #navigation h4, #navigation h5, #navigation h6 {
|
57
|
+
font-size: smaller;
|
58
|
+
}
|
59
|
+
|
60
|
+
#navigation li {
|
61
|
+
margin-left: -1.25em;
|
62
|
+
}
|
55
63
|
|
56
|
-
#navigation h1 {
|
57
|
-
padding: 0.5em;
|
58
|
-
margin-top: 0px;
|
59
|
-
}
|
60
64
|
|
61
65
|
/* admonitions */
|
62
|
-
.admonition {
|
63
|
-
border: thin solid steelblue;
|
64
|
-
background-color: aliceblue;
|
65
|
-
padding: 1em;
|
66
|
-
}
|
67
66
|
|
68
|
-
|
69
|
-
|
70
|
-
|
67
|
+
.admonition {
|
68
|
+
border: thin solid steelblue;
|
69
|
+
background-color: aliceblue;
|
70
|
+
padding: 1em;
|
71
|
+
padding-top: 0px;
|
72
|
+
}
|
73
|
+
|
74
|
+
.admonition img {
|
75
|
+
margin-right: 2em;
|
76
|
+
}
|
77
|
+
|
71
78
|
|
72
79
|
/* source code */
|
73
|
-
tt {
|
74
|
-
font-weight: bold;
|
75
|
-
background-color: lemonchiffon;
|
76
|
-
}
|
77
80
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
display: block;
|
83
|
-
}
|
81
|
+
tt {
|
82
|
+
font-weight: bold;
|
83
|
+
background-color: lemonchiffon;
|
84
|
+
}
|
84
85
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
86
|
+
pre, blockquote .code {
|
87
|
+
padding: 1em;
|
88
|
+
line-height: normal;
|
89
|
+
overflow: auto;
|
90
|
+
display: block;
|
91
|
+
}
|
89
92
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
93
|
+
pre {
|
94
|
+
border: thin solid darkgray;
|
95
|
+
background-color: whitesmoke;
|
96
|
+
}
|
97
|
+
|
98
|
+
.code {
|
99
|
+
border: thin solid darkkhaki;
|
100
|
+
background-color: ivory;
|
101
|
+
}
|
94
102
|
|
95
103
|
|
96
104
|
/* tables */
|
97
|
-
th, td {
|
98
|
-
padding: 1em;
|
99
|
-
border: thin solid silver;
|
100
|
-
}
|
101
105
|
|
102
|
-
|
103
|
-
|
104
|
-
|
106
|
+
th, td {
|
107
|
+
padding: 1em;
|
108
|
+
border: thin solid silver;
|
109
|
+
}
|
110
|
+
|
111
|
+
th {
|
112
|
+
background-color: whitesmoke;
|
113
|
+
}
|
114
|
+
|
105
115
|
|
106
116
|
/* formal blocks; see http://www.sagehill.net/docbookxsl/FormalTitles.html */
|
107
|
-
.formal {
|
108
|
-
margin: 1em;
|
109
|
-
}
|
110
117
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
}
|
118
|
+
.formal {
|
119
|
+
margin: 1em;
|
120
|
+
}
|
115
121
|
|
116
|
-
|
117
|
-
|
118
|
-
|
122
|
+
.title {
|
123
|
+
display: block;
|
124
|
+
font-size: large;
|
125
|
+
}
|
119
126
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
margin-right: auto;
|
124
|
-
}
|
127
|
+
.formal .title {
|
128
|
+
text-align: center
|
129
|
+
}
|
125
130
|
|
126
|
-
.formal img, #navigation img {
|
127
|
-
display: block;
|
128
|
-
}
|
129
131
|
|
130
|
-
/*
|
131
|
-
|
132
|
-
|
132
|
+
/* center-align any tables and images */
|
133
|
+
|
134
|
+
.formal table, .formal img, #navigation img {
|
135
|
+
margin-left: auto;
|
136
|
+
margin-right: auto;
|
133
137
|
}
|
134
138
|
|
135
|
-
|
136
|
-
|
139
|
+
.formal img, #navigation img {
|
140
|
+
display: block;
|
137
141
|
}
|
138
142
|
|
139
143
|
|
144
|
+
/* misc. */
|
145
|
+
|
146
|
+
.cover-page {
|
147
|
+
text-align: center;
|
148
|
+
}
|
149
|
+
|
150
|
+
a img {
|
151
|
+
border: none;
|
152
|
+
}
|
153
|
+
|
154
|
+
|
140
155
|
/* extra spacing before big block elements */
|
141
156
|
|
142
157
|
.admonition, .figure {
|
data/doc/common.tpl
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
<title><%= page_title %></title>
|
17
17
|
</head>
|
18
18
|
<body>
|
19
|
-
<% if table_of_contents %>
|
19
|
+
<% if table_of_contents %>
|
20
20
|
<div id="navigation">
|
21
21
|
<%= %{"!images/home.png(project home)!":readme.html}.redcloth %>
|
22
22
|
|
@@ -26,24 +26,23 @@
|
|
26
26
|
%{#{'*' * h.depth} "#{h.title}":##{h.anchor}}
|
27
27
|
end.join("\n").redcloth
|
28
28
|
%>
|
29
|
-
<%
|
30
|
-
@blocks.keys.sort_by {|k| k.to_s}.each do |type|
|
31
|
-
list = @blocks[type]
|
32
29
|
|
33
|
-
|
34
|
-
%>
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
%>
|
30
|
+
<% DocProxy::CATEGORIES.each_pair do |cat, types| %>
|
31
|
+
<h1><%= cat.to_s.capitalize %>s</h1>
|
32
|
+
|
33
|
+
<% types.each do |type| list = @blocks[type] %>
|
34
|
+
<% unless list.empty? %>
|
35
|
+
<h2><%= type.to_s.capitalize %>s</h2>
|
36
|
+
<%=
|
37
|
+
list.inject('') do |memo, block|
|
38
|
+
memo << "# #{(block.title || block.anchor).inspect}:##{block.anchor}\n"
|
39
|
+
end.redcloth
|
40
|
+
%>
|
41
|
+
<% end %>
|
42
|
+
<% end %>
|
43
|
+
<% end %>
|
45
44
|
</div>
|
46
|
-
<% end %>
|
45
|
+
<% end %>
|
47
46
|
<%= content.to_html %>
|
48
47
|
</body>
|
49
48
|
</html>
|