class Asciidoctor::Diagram::GraphvizPyConverter
@private
Public Instance Methods
collect_options(source)
click to toggle source
# File lib/asciidoctor-diagram/graphviz_py/converter.rb, line 16 def collect_options(source) { :layout => source.attr('layout'), :argument => source.attr('argument') } end
convert(source, format, options)
click to toggle source
# File lib/asciidoctor-diagram/graphviz_py/converter.rb, line 23 def convert(source, format, options) generate_stdin(source.find_command('graphviz-py'), 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 argument = options[:argument] if argument args << "-a" args << argument end { :args => args, :chdir => source.base_dir } end end
supported_formats()
click to toggle source
# File lib/asciidoctor-diagram/graphviz_py/converter.rb, line 12 def supported_formats [:png, :pdf, :svg] end