Sha256: 9bc49ef2ad7f66f0783fea7b4752347943278eb5ca1b561f72a0e466b38a973c

Contents?: true

Size: 424 Bytes

Versions: 16

Compression:

Stored size: 424 Bytes

Contents

# frozen_string_literal: true

require "ruby-graphviz"
require "lutaml/layout/engine"

module Lutaml
  module Layout
    class GraphVizEngine < Engine
      def render(type)
        Open3.popen3("dot -T#{type}") do |stdin, stdout, _stderr, _wait|
          stdin.puts(input)
          stdin.close
          # unless (err = stderr.read).empty? then raise err end
          stdout.read
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
lutaml-uml-0.4.3 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.4.1 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.4.0 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.3.2 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.3.1 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.3.0 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.2.12 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.2.10 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.2.9 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.2.8 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.2.7 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.2.6 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.2.5 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.2.4 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.2.3 lib/lutaml/layout/graph_viz_engine.rb
lutaml-uml-0.2.2 lib/lutaml/layout/graph_viz_engine.rb