lib/asciidoctor/templates_compiler/base.rb
def compile_converter(templates_dir:, engine_opts: {}, pretty: false, **opts)
      unless Dir.exist? templates_dir
        raise ArgumentError, "Templates directory '#{templates_dir}' does not exist"
      end

      templates = find_templates(templates_dir)
      transforms_code = compile_templates(templates, engine_opts, pretty: pretty)

      generate_class(transforms_code: transforms_code,
                     helpers_code: read_helpers(templates_dir), **opts)
    end
def compile_converter(templates_dir:, engine_opts: {}, pretty: false, **opts)
      unless Dir.exist? templates_dir
        raise ArgumentError, "Templates directory '#{templates_dir}' does not exist"
      end

      templates = find_templates(templates_dir)
      transforms_code = compile_templates(templates, engine_opts, pretty: pretty)

      generate_class(transforms_code: transforms_code,
                     helpers_code: read_helpers(templates_dir), **opts)
    end
def compile_converter ( templates_dir : , engine_opts : { } , pretty : false , ** opts ) unless Dir . exist? templates_dir raise ArgumentError , "Templates directory '#{templates_dir}' does not exist" end templates = find_templates ( templates_dir ) transforms_code = compile_templates ( templates , engine_opts , pretty : pretty ) generate_class ( transforms_code : transforms_code , helpers_code : read_helpers ( templates_dir ) , ** opts ) end
(see ConverterGenerator.generate)

 Compiles templates found in _templates_dir_ to Ruby and generates an Asciidoctor converter
 class from them.

 @param templates_dir [String] path of the directory where to look for templates
   and (optional) +helpers.rb+.
 @param engine_opts [Hash] a hash of options to pass into the templating engine.
   Default is empty.
 @param pretty [Boolean] enable pretty-formatting of the generated Ruby code?

 @raise [ArgumentError] if the given _templates_dir_ does not exist.
( see ConverterGenerator . generate )