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

Methods

Public Instance methods

[Source]

     # File generators/xhtml_generator.rb, line 406
406:     def create_source_code_file(code_body)
407:       template_regexp = Regexp.new("\\." + @options.template + "$")
408:       meth_path = @html_class.path.sub(template_regexp, '.src')
409:       File.makedirs(meth_path)
410:       file_path = File.join(meth_path, @seq) + '.' + @options.template
411: 
412:       template = TemplatePage.new(RDoc::Page::SRC_PAGE)
413:       File.open(file_path, "w") do |f|
414:         values = {
415:           'title'     => CGI.escapeHTML(index_name),
416:           'code'      => code_body,
417:           'style_url' => style_url(file_path, @options.css),
418:           'mathml_xsl_url'  => style_url('', "mathml.xsl"),
419:           'charset'   => @options.charset
420:         }
421:         template.write_html_on(f, values)
422:       end
423:       XHTMLGenerator.gen_url(path, file_path)
424:     end

[Validate]