Class: Brandish::Processors::HTML::Output

Inherits:
Common::Output show all
Defined in:
lib/brandish/processors/html/output.rb,
lib/brandish/processors/html/output/document.rb

Overview

Outputs the result of processing the document. Without this processor, the document is not output, and most other processors have no effect.

Options:

  • :template - Optional. The name of the template to use. This defaults to the format used.
  • :path - Optional. The full path, including the file name, to output the file. This overwrites :directory and :file. Defaults to :directory/:file.
  • :directory - Optional. The directory to the file to output the file. Overwritten by :path. Defaults to the output path of the project.
  • :file - Optional. The name of the file to output to. Overwritten by :path. Defaults to the name of the entry file, with the extension substituted by ".html".

See Also:

Defined Under Namespace

Classes: Document

Instance Attribute Summary

Attributes inherited from Brandish::Processor::Base

#context

Instance Method Summary collapse

Methods inherited from Common::Output

#postprocess

Methods inherited from Brandish::Processor::Base

#accept, #call, #initialize, #postprocess, #process_block, #process_command, #process_root, #process_text, register

Constructor Details

This class inherits a constructor from Brandish::Processor::Base

Instance Method Details

#setupvoid

This method returns an undefined value.

Sets up the output processor. This creates a Document and puts it on the :document context option.



36
37
38
39
40
41
# File 'lib/brandish/processors/html/output.rb', line 36

def setup
  super

  @document = @context[:document] = Document.new
  @document.title = @context.configure.root.basename.to_s
end