Class: Asciidoctor::Diagram::SymbolatorConverter

Inherits:
Object
  • Object
show all
Includes:
CliGenerator, DiagramConverter
Defined in:
lib/asciidoctor-diagram/symbolator/converter.rb

Instance Method Summary collapse

Methods included from CliGenerator

#generate_file, #generate_file_stdout, #generate_stdin, #generate_stdin_file, #generate_stdin_stdout

Methods included from DiagramConverter

#collect_options, #native_scaling?, #wrap_source

Instance Method Details

#convert(source, format, options) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/asciidoctor-diagram/symbolator/converter.rb', line 16

def convert(source, format, options)
  generate_stdin(source.find_command('symbolator'), format.to_s, source.to_s) do |tool_path, output_path|
    {
      :args => [tool_path, "-i-", "-o#{Platform.native_path(output_path)}", "-f#{format.to_s}"],
      :chdir => source.base_dir
    }
  end
end

#supported_formatsObject



12
13
14
# File 'lib/asciidoctor-diagram/symbolator/converter.rb', line 12

def supported_formats
  [:png, :pdf, :svg]
end