class Asciidoctor::Converter::Base
AsciiDoc document to a backend format such as HTML or DocBook.
An abstract base class for defining converters that can be used to convert {AbstractNode} objects in a parsed
def content_only node
Public: Converts the {AbstractNode} using only its converted content.
def content_only node node.content end
def convert node, transform = node.node_name, opts = nil
accepts the node as its only argument.
feature is used for the outline transform. If the +opts+ argument is nil, this method assumes the dispatch method
Hash. The options Hash may be used by converters to delegate back to the top-level converter. Currently, this
+opts+ argument is non-nil, this method assumes the dispatch method accepts two arguments, the node and an options
This method looks for a method whose name matches the transform prefixed with "convert_" to dispatch to. If the
Public: Converts an {AbstractNode} by delegating to a method that matches the transform value.
def convert node, transform = node.node_name, opts = nil opts ? (send 'convert_' + transform, node, opts) : (send 'convert_' + transform, node) rescue raise unless ::NoMethodError === (ex = $!) && ex.receiver == self && ex.name.to_s == transform logger.warn %(missing convert handler for #{ex.name} node in #{@backend} backend (#{self.class})) nil end
def handles? transform
def handles? transform respond_to? %(convert_#{transform}) end
def skip node; end
Public: Skips conversion of the {AbstractNode}.
def skip node; end