class Asciidoctor::DocTest::NoFallbackTemplateConverter
@private TemplateConverter that doesn’t fallback to a built-in converter when no template for a node is found.
Constants
- NOT_FOUND_MARKER
Placeholder to be written in a rendered output in place of the node’s content that cannot be rendered due to missing template.
Public Class Methods
new(backend, opts = {})
click to toggle source
Calls superclass method
# File lib/asciidoctor/doctest/asciidoc_renderer.rb, line 88 def initialize(backend, opts = {}) super Asciidoctor::Converter::TemplateConverter.new(backend, opts[:template_dirs], opts) end
Public Instance Methods
convert(node, template_name = nil, opts = {})
click to toggle source
Delegates to the template converter and returns results, or prints warning and returns {NOT_FOUND_MARKER} if there is no template to handle the specified template_name
.
Calls superclass method
# File lib/asciidoctor/doctest/asciidoc_renderer.rb, line 96 def convert(node, template_name = nil, opts = {}) template_name ||= node.node_name if handles? template_name super else warn "Could not find a custom template to handle template_name: #{template_name}" NOT_FOUND_MARKER end end
Also aliased as: convert_with_options
convert_with_options(node, template_name = nil, opts = {})
Alias for backward compatibility.
Alias for: convert