module Asciidoctor::Diagram::Nomnoml
@private
Public Class Methods
included(mod)
click to toggle source
# File lib/asciidoctor-diagram/nomnoml/extension.rb, line 13 def self.included(mod) [:svg].each do |f| mod.register_format(f, :image) do |parent, source| nomnoml(parent, source, f) end end end
Public Instance Methods
nomnoml(parent, source, format)
click to toggle source
# File lib/asciidoctor-diagram/nomnoml/extension.rb, line 21 def nomnoml(parent, source, format) generate_file(which(parent, 'nomnoml'), 'nomnoml', format.to_s, source.to_s) do |tool_path, input_path, output_path| [tool_path, Platform.native_path(input_path), Platform.native_path(output_path)] end end