class Asciidoctor::Diagram::GraphvizConverter

@private

Public Instance Methods

collect_options(source) click to toggle source
# File lib/asciidoctor-diagram/graphviz/converter.rb, line 16
def collect_options(source)
  {:layout => source.attr('layout')}
end
convert(source, format, options) click to toggle source
# File lib/asciidoctor-diagram/graphviz/converter.rb, line 20
def convert(source, format, options)
  generate_stdin(source.find_command('dot', :alt_attrs => ['graphvizdot']), format.to_s, source.to_s) do |tool_path, output_path|
    args = [tool_path, "-o#{Platform.native_path(output_path)}", "-T#{format.to_s}"]

    layout = options[:layout]
    args << "-K#{layout}" if layout

    args
  end
end
supported_formats() click to toggle source
# File lib/asciidoctor-diagram/graphviz/converter.rb, line 12
def supported_formats
  [:png, :pdf, :svg]
end