class Asciidoctor::Diagram::Extensions::ReaderSource

A diagram source that retrieves the code for the diagram from the contents of a block.

Public Class Methods

new(parent_block, reader, attributes) click to toggle source
# File lib/asciidoctor-diagram/extensions.rb, line 473
def initialize(parent_block, reader, attributes)
  super(parent_block, attributes)
  @reader = reader
end

Public Instance Methods

code() click to toggle source
# File lib/asciidoctor-diagram/extensions.rb, line 478
def code
  @code ||= @parent_block.apply_subs(@reader.lines, resolve_diagram_subs).join("\n")
end