Module: Asciidoctor::Diagram::Umlet
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Which
which, #which
#generate, #generate_file, #generate_stdin
Class Method Details
.included(mod) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/asciidoctor-diagram/umlet/extension.rb', line 13
def self.included(mod)
[:svg, :png, :pdf, :gif].each do |f|
mod.register_format(f, :image) do |parent, source|
umlet(parent, source, f)
end
end
end
|
Instance Method Details
#umlet(parent, source, format) ⇒ Object
21
22
23
24
25
|
# File 'lib/asciidoctor-diagram/umlet/extension.rb', line 21
def umlet(parent, source, format)
generate_file(which(parent, 'umlet'), 'uxf', format.to_s, source.to_s) do |tool_path, input_path, output_path|
[tool_path, '-action=convert', "-format=#{format.to_s}", "-filename=#{Platform.native_path(input_path)}", "-output=#{Platform.native_path(output_path)}"]
end
end
|