Sha256: aa04a25f3c0c081891d58ae74a20eff73ae19779a1c26e773c0fa6505c35e45d
Contents?: true
Size: 617 Bytes
Versions: 1
Compression:
Stored size: 617 Bytes
Contents
require 'graphviz' require_relative 'parser' module Architect ## # Diagram is the base class for generating any diagram. class Diagram # Draw # [diagram] string containing the markup of the diagram def draw(diagram, output = "class_diagram.png", ext = 'png') parser = Parser.new elements = parser.parse(diagram) graph = GraphViz.new("ClassDiagram", type: "digraph") graph.node["fillcolor"] = "gray95" graph.node["style"] = "filled" elements.each do |element| element.graph(graph) end graph.output(ext.to_sym => output) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
uml_architect-0.0.2 | lib/architect/diagram.rb |