| Class | RDoc::TemplatePage |
| In: |
template.rb
doc-tmp/rdoc/template.rb |
| Parent: | Object |
Create a new TemplatePage that will use templates.
# File template.rb, line 34
34: def initialize(*templates)
35: @templates = templates
36: end
Create a new TemplatePage that will use templates.
# File doc-tmp/rdoc/template.rb, line 34
34: def initialize(*templates)
35: @templates = templates
36: end
Returns "<a href=\"#{ref}\">#{name}</a>"
# File doc-tmp/rdoc/template.rb, line 41
41: def href(ref, name)
42: if ref then
43: "<a href=\"#{ref}\">#{name}</a>"
44: else
45: name
46: end
47: end
Returns "<a href=\"#{ref}\">#{name}</a>"
# File template.rb, line 41
41: def href(ref, name)
42: if ref then
43: "<a href=\"#{ref}\">#{name}</a>"
44: else
45: name
46: end
47: end
Process the template using values, writing the result to io.
# File template.rb, line 52
52: def write_html_on(io, values)
53: b = binding
54: template_include = ""
55:
56: @templates.reverse_each do |template|
57: template_include = ERB.new(template).result b
58: end
59:
60: io.write template_include
61: end
Process the template using values, writing the result to io.
# File doc-tmp/rdoc/template.rb, line 52
52: def write_html_on(io, values)
53: b = binding
54: template_include = ""
55:
56: @templates.reverse_each do |template|
57: template_include = ERB.new(template).result b
58: end
59:
60: io.write template_include
61: end