class Jekyll::Diagrams::SvgbobRenderer

Constants

CONFIGURATIONS

Public Instance Methods

build_command(config) click to toggle source
# File lib/jekyll-diagrams/svgbob/renderer.rb, line 14
def build_command(config)
  command = +'svgbob'

  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/svgbob/renderer.rb, line 8
def render_svg(code, config)
  command = build_command(config)

  render_with_stdin_stdout(command, code)
end