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

Methods

Public Instance methods

[Source]

     # File generators/xhtml_generator.rb, line 419
419:     def create_source_code_file(code_body)
420:       template_regexp = Regexp.new("\\." + @options.template + "$")
421:       meth_path = @html_class.path.sub(template_regexp, '.src')
422:       File.makedirs(meth_path)
423:       file_path = File.join(meth_path, @seq) + '.' + @options.template
424: 
425:       template = TemplatePage.new(RDoc::Page::SRC_PAGE)
426:       File.open(file_path, "w") do |f|
427:         values = {
428:           'title'     => CGI.escapeHTML(index_name),
429:           'code'      => code_body,
430:           'style_url' => style_url(file_path, @options.css),
431:           'mathml_xsl_url'  => style_url('', "mathml.xsl"),
432:           'charset'   => @options.charset
433:         }
434:         template.write_html_on(f, values)
435:       end
436:       XHTMLGenerator.gen_url(path, file_path)
437:     end

[Validate]