class Asciidoctor::Diagram::SyntraxConverter
@private
Public Instance Methods
collect_options(source)
click to toggle source
# File lib/asciidoctor-diagram/syntrax/converter.rb, line 17 def collect_options(source) { :heading => source.attr('heading'), :scale => source.attr('scale'), :transparent => source.attr('transparent'), :style => source.attr('style') } end
convert(source, format, options)
click to toggle source
# File lib/asciidoctor-diagram/syntrax/converter.rb, line 26 def convert(source, format, options) generate_file(source.find_command('syntrax'), 'spec', format.to_s, source.to_s) do |tool_path, input_path, output_path| args = [tool_path, '-i', Platform.native_path(input_path), '-o', Platform.native_path(output_path)] title = options[:heading] if title args << '--title' << title end scale = options[:scale] if scale args << '--scale' << scale end transparent = options[:transparent] if transparent == 'true' args << '--transparent' end style = options[:style] if style args << '--style' << style end args end end
native_scaling?()
click to toggle source
# File lib/asciidoctor-diagram/syntrax/converter.rb, line 53 def native_scaling? true end
supported_formats()
click to toggle source
# File lib/asciidoctor-diagram/syntrax/converter.rb, line 13 def supported_formats [:png, :svg] end