class Asciidoctor::Converter::BuiltIn
An abstract base class for built-in {Converter} classes.
Public Class Methods
new(backend, opts = {})
click to toggle source
# File lib/asciidoctor/converter/base.rb, line 16 def initialize backend, opts = {} end
Public Instance Methods
content(node)
click to toggle source
Public: Returns the converted content of the {AbstractNode}.
Returns the converted [String] content of the {AbstractNode}.
# File lib/asciidoctor/converter/base.rb, line 45 def content node node.content end
Also aliased as: pass
convert(node, transform = nil)
click to toggle source
Public: Converts the specified {AbstractNode} using the specified transform.
See {Converter#convert} for more details.
Returns the [String] result of conversion
# File lib/asciidoctor/converter/base.rb, line 24 def convert node, transform = nil transform ||= node.node_name send transform, node end
convert_with_options(node, transform = nil, opts = {})
click to toggle source
Public: Converts the specified {AbstractNode} using the specified transform with additional options.
See {Converter#convert_with_options} for more details.
Returns the [String] result of conversion
# File lib/asciidoctor/converter/base.rb, line 35 def convert_with_options node, transform = nil, opts = {} transform ||= node.node_name send transform, node, opts end
skip(node)
click to toggle source
Public: Skips conversion of the {AbstractNode}.
Returns [NilClass]
# File lib/asciidoctor/converter/base.rb, line 54 def skip node nil end