Class: HTMLWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc/generator/html_writer.rb

Overview

HTMLWriter builds HTML file from a template and copies HTML and theme files to the output directory.

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ HTMLWriter

Returns a new instance of HTMLWriter.



6
7
8
# File 'lib/rdoc/generator/html_writer.rb', line 6

def initialize(options)
  @options = options
end

Instance Method Details

#write(data, theme_files, template) ⇒ Object



10
11
12
13
14
# File 'lib/rdoc/generator/html_writer.rb', line 10

def write(data, theme_files, template)
  html = template.render(data)
  install_theme(theme_files)
  install_html(html)
end