Class: Asciidoctor::Diagram::GoATConverter
Instance Method Summary
collapse
#generate_file, #generate_file_stdout, #generate_stdin, #generate_stdin_file, #generate_stdin_stdout
#native_scaling?, #wrap_source
Instance Method Details
#collect_options(source) ⇒ Object
16
17
18
19
20
21
|
# File 'lib/asciidoctor-diagram/goat/converter.rb', line 16
def collect_options(source)
{
sds: source.attr("svg-color-dark-scheme"),
sls: source.attr("svg-color-light-scheme"),
}
end
|
#convert(source, format, options) ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/asciidoctor-diagram/goat/converter.rb', line 23
def convert(source, format, options)
sds, sls = options.values_at(:sds, :sls)
generate_stdin_stdout(source.find_command("goat"), source.code) do |tool|
args = [tool]
args.push("-sds", sds) if sds
args.push("-sls", sls) if sls
{
args: args,
chdir: source.base_dir,
}
end
end
|
12
13
14
|
# File 'lib/asciidoctor-diagram/goat/converter.rb', line 12
def supported_formats
[:svg]
end
|