class Jekyll::Diagrams::SMCatRenderer
Constants
- CONFIGURATIONS
- XML_REGEX
Public Instance Methods
build_command(config)
click to toggle source
# File lib/jekyll-diagrams/smcat/renderer.rb, line 19 def build_command(config) command = +'smcat' CONFIGURATIONS.each do |conf| command << " --#{conf} #{config[conf]}" if config.key?(conf) end command end
render_svg(code, config)
click to toggle source
# File lib/jekyll-diagrams/smcat/renderer.rb, line 9 def render_svg(code, config) command = build_command(config) svg = render_with_tempfile(command, code) do |input, output| "#{input} --output-to #{output}" end svg.sub!(XML_REGEX, '') end