class Asciidoctor::Reader

def initialize(data = [], document = nil, overrides = nil, &block)

reader = Asciidoctor::Reader.new data
data = File.readlines(filename)

Examples

data to include in this document.
block - A block that can be used to retrieve external Asciidoc
the document
prevent attribute assignments or removals of matching keys found in
overrides - A Hash of attributes that were passed to the Document and should
document attributes
document - The document with which this reader is associated. Used to access
original instance of this Array is not modified
data - The Array of Strings holding the Asciidoc source document. The

Public: Initialize the Reader object.
def initialize(data = [], document = nil, overrides = nil, &block)
  # if document is nil, we assume this is a preprocessed string
  if document.nil?
    @lines = data.is_a?(String) ? data.lines.entries : data.dup
  elsif !data.empty?
    @overrides = overrides || {}
    @document = document
    process(data.is_a?(String) ? data.lines.entries : data, &block)
  else
    @lines = []
  end
  @source = @lines.join
end