Sha256: c6851c29d936e128ab72429ce3b00acfce85b81faa0a0bb7d9059621921167ed

Contents?: true

Size: 384 Bytes

Versions: 29

Compression:

Stored size: 384 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|
          stdout.binmode
          stdin.puts(input)
          stdin.close
          stdout.read
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
lutaml-0.9.25 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.24 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.23 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.22 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.21 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.20 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.19 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.18 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.17 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.16 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.15 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.14 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.13 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.12 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.11 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.10 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.9 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.8 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.7 lib/lutaml/layout/graph_viz_engine.rb
lutaml-0.9.6 lib/lutaml/layout/graph_viz_engine.rb