graphvizml 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d063484a482cc9e2512ffd708dd8c8cfb29f85d2
4
- data.tar.gz: 44a191e3277241d87b481a343fbfbd07ad0a293f
3
+ metadata.gz: '084ecce99b3b042483e5573fd69dcdc0603999bc'
4
+ data.tar.gz: a584ecbe5abb0dbd0812fc1d35ac62783b5e315c
5
5
  SHA512:
6
- metadata.gz: 7622da9909b58dae25bd620f253f9a9711cd2eccad4ef20e3a6d1b9c38dda60ac59030934be4608b0a645a7f032bbc81aac225c837b04bc07d24d439c7c036df
7
- data.tar.gz: 6fd1f2d279d1bf25ae43867bb5c80d1c27e7e7eb394272d8787f9175a83fa72f55e32c26101b404c98e515a2c0f9faae8b422ca9fe5d33a35a053fec22072cca
6
+ metadata.gz: 6c7bd783d91c214f3d47d27252ff1ee637cda948e589e51c5b44ffa26d28e0dd5da3d29f20f531b1681461fdb16505800b79d7a328769278049f22ab6f459753
7
+ data.tar.gz: 68ab72875a7ed6f68a97abdefdf3aa9c4b5a5d0372baa2decafe0dbe707521f8b21a599e4469b0d7009c96e568913564050928c124b2fb8867f70a385b25111c
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/graphvizml.rb CHANGED
@@ -34,6 +34,10 @@ class GraphVizML
34
34
  build()
35
35
 
36
36
  end
37
+
38
+ def to_dot()
39
+ @g.to_dot
40
+ end
37
41
 
38
42
  # writes to a PNG file (not a PNG blob)
39
43
  #
@@ -87,7 +91,6 @@ class GraphVizML
87
91
 
88
92
  end
89
93
 
90
- #puts @g.to_dot
91
94
 
92
95
  # add the styling once the objects have been created
93
96
 
@@ -110,26 +113,23 @@ class GraphVizML
110
113
  [raw_selector.split(/,\s*/).map(&:strip), h]
111
114
  end
112
115
 
113
- node_style = a.detect {|x| x.assoc 'node'}
114
-
115
- if node_style then
116
+ node_style = a.detect {|x| x.assoc 'node'}
116
117
 
117
- nodes.each do |id, x|
118
- node_style.last.each {|key, value| x.last.attributes[key] = value }
119
- end
120
- end
118
+ nodes.each do |id, x|
119
+
120
+ _, attributes, obj = x
121
+ attributes.each {|key, value| obj.attributes[key] = value }
122
+ node_style.last.each {|key, value| obj.attributes[key] = value } if node_style
123
+
124
+ end
121
125
 
122
126
  edge_style = a.detect {|x| x.assoc 'edge'}
123
127
 
124
- if edge_style then
125
-
126
- nodes.each do |id,x|
127
- x.last.connections.each do |conn|
128
- edge_style.last.each {|key, value| conn.attributes[key] = value }
129
- end
130
- end
131
- end
132
-
128
+ nodes.each do |id,x|
129
+ x.last.connections.each do |conn|
130
+ edge_style.last.each {|key, value| conn.attributes[key] = value } if edge_style
131
+ end
132
+ end
133
133
 
134
134
  :build
135
135
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphvizml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file