Methods
N
T
Classes and Modules
Attributes
[R] format

Data from the format specification file.

[R] roots

All root nodes in the document.

[R] nodes

All nodes in the document.

[R] nodes_by_type

All nodes in the document arranged by node type.

Class Public methods
new(format_name, input_text, input_file, options = {})

Parameters

format_name
Either the short-hand name of a built-in format or the path to a format specification file.
input_text
The body of the input document.
input_file
Name of the file from which the input document originated.

Options

:unindent
If true, all node content is unindented hierarchically.
# File lib/erbook/document.rb, line 42
    def initialize format_name, input_text, input_file, options = {}
      load_format format_name

      @input_text = input_text
      @input_file = input_file
      @options    = options

      process_input_document
    end
Instance Public methods
to_s()

Returns the output of this document.

# File lib/erbook/document.rb, line 55
    def to_s
      Template.new("#{@format_file}:output", @format['output'].to_s).
      render_with(@template_vars.merge(:@content => @evaluated_document.join))
    end