Method: Asciidoctor::Converter#convert

Defined in:
lib/asciidoctor/converter.rb

#convert(node, transform = nil, opts = nil) ⇒ String

Converts an AbstractNode using the given transform.

This method must be implemented by a concrete converter class.

Parameters:

  • node

    The concrete instance of AbstractNode to convert.

  • transform (defaults to: nil)

    An optional String transform that hints at which transformation should be applied to this node. If a transform is not given, the transform is often derived from the value of the AbstractNode#node_name property. (optional, default: nil)

  • opts (defaults to: nil)

    An optional Hash of options hints about how to convert the node. (optional, default: nil)

Returns:

  • (String)

    Returns the String result.

Raises:

  • (::NotImplementedError)


71
72
73
# File 'lib/asciidoctor/converter.rb', line 71

def convert node, transform = nil, opts = nil
  raise ::NotImplementedError, %(#{self.class} (backend: #{@backend}) must implement the ##{__method__} method)
end