universe_compiler 0.3.10 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/universe_compiler/utils/graphviz.rb +19 -7
- data/lib/universe_compiler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a9c5305504a0ba0c08d213c554fbf15da8560de
|
4
|
+
data.tar.gz: 994298bbc4d7fe1ce84fff0002c84e94012c9833
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35507311f33e9d51c833005e52099d18c3945bbe4eaf20796b9cc95346dbc84268b8dcf24620b9d51eb96fca3471d0d70467ba6f2ab5f95c386f933e0837ba18
|
7
|
+
data.tar.gz: 5740a21af39a1d54502190a55dc54875fc978f2c858d5c8c39d72a932a76b64d18bc716cbcbab7be92b3f278ee96e830f7dc0409e0312d75acfebac6e9647cec
|
@@ -5,13 +5,25 @@ module UniverseCompiler
|
|
5
5
|
|
6
6
|
module Graphviz
|
7
7
|
|
8
|
-
def graph_entities_to_file(entities,
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
def graph_entities_to_file(entities, options = {}, &block)
|
9
|
+
|
10
|
+
graph_type = options.fetch :graph_type, :digraph
|
11
|
+
output_file_name = options.fetch :output_file_name, nil
|
12
|
+
file_type = options.fetch :file_type, :svg
|
13
|
+
generate_file = options.fetch :generate_file, true
|
14
|
+
error_level = options.fetch :error_level, 1
|
15
|
+
parent_graph = options.fetch :parent_graph, nil
|
16
|
+
program = options.fetch :program, :dot
|
17
|
+
text_output_format = options.fetch :text_output_format, :dot
|
18
|
+
|
19
|
+
graph_options = { type: graph_type,
|
20
|
+
errors: error_level,
|
21
|
+
use: program,
|
22
|
+
parent: parent_graph,
|
23
|
+
output: text_output_format
|
24
|
+
}
|
25
|
+
|
26
|
+
g = GraphViz.new :G, graph_options
|
15
27
|
|
16
28
|
cache = {by_node: {}, by_entity: {}}
|
17
29
|
# Building nodes
|