Class Generators::XHtmlMethod
In: generators/xhtml_generator.rb
Parent: HtmlMethod

Methods

Public Instance methods

[Source]

     # File generators/xhtml_generator.rb, line 383
383:     def create_source_code_file(code_body)
384:       template_regexp = Regexp.new("\\." + @options.template + "$")
385:       meth_path = @html_class.path.sub(template_regexp, '.src')
386:       File.makedirs(meth_path)
387:       file_path = File.join(meth_path, @seq) + '.' + @options.template
388: 
389:       template = TemplatePage.new(RDoc::Page::SRC_PAGE)
390:       File.open(file_path, "w") do |f|
391:         values = {
392:           'title'     => CGI.escapeHTML(index_name),
393:           'code'      => code_body,
394:           'style_url' => style_url(file_path, @options.css),
395:           'mathml_xsl_url'  => style_url('', "mathml.xsl"),
396:           'charset'   => @options.charset
397:         }
398:         template.write_html_on(f, values)
399:       end
400:       XHTMLGenerator.gen_url(path, file_path)
401:     end

[Validate]