class Asciidoctor::Diagram::ErdConverter
@private
Public Instance Methods
convert(source, format, options)
click to toggle source
# File lib/asciidoctor-diagram/erd/converter.rb, line 17 def convert(source, format, options) erd_path = source.find_command('erd', :alt_cmds => ['erd-go']) dot_path = source.find_command('dot', :alt_attrs => ['graphvizdot']) dot_code = generate_stdin(erd_path, format.to_s, source.to_s) do |tool_path, output_path| [tool_path, '-o', Platform.native_path(output_path), '-f', 'dot'] end generate_stdin(dot_path, format.to_s, dot_code) do |tool_path, output_path| { :args => [tool_path, "-o#{Platform.native_path(output_path)}", "-T#{format.to_s}"], :chdir => source.base_dir } end end
supported_formats()
click to toggle source
# File lib/asciidoctor-diagram/erd/converter.rb, line 13 def supported_formats [:png, :svg] end