flowchartviz 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb9397f9af13f07389276b0ec5434324cccf353b
4
- data.tar.gz: 20c4225d5a45ccb48bd80050ea785567b221d220
3
+ metadata.gz: c89f3fff3a292f82fe61ead8c09ff90379e83bc4
4
+ data.tar.gz: 9cae8dd2198a67c86d2329ea7f5e3bef10d0e734
5
5
  SHA512:
6
- metadata.gz: 72a6298b2fda14146c61335f4f4cb91ca91de4e6f08e5ffe6d8d4e2eafdd9d38dbb0be51b16c89911122789a8373a9650a46d4eb9500c44a3cae2ad6852787c3
7
- data.tar.gz: b9d067da73ac7f69fb6996f4d330ee820fe1a0939a8f4e36f85dd97259780f20f95d50a547c01ab0890353dde507945f9bf661a21a344d2b809042b7c375f691
6
+ metadata.gz: 2e202a94d55462cfa4dc7a7be1cf613c4065c823bb2c6652b2fd74ae51ed534e7f8aa365ae24017bd4ad100dea5574452f430787f1aca25e9b0d23b2aa42f099
7
+ data.tar.gz: 2d861528a05941502a6e370df45fb39f0bc6ba42f6f0d546571f341e15f129125ab9ff53f8b445dd99bcca82aeefcb08d4d6d9fbd053752a1efdf05fca63f421
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/flowchartviz.rb CHANGED
@@ -9,17 +9,19 @@ require 'pxgraphviz'
9
9
 
10
10
  class Flowchartviz
11
11
 
12
+ attr_reader :raw_doc
13
+
12
14
  def initialize(s)
13
15
 
14
16
  plaintext = scan(LineTree.new(s).to_a).flatten.compact.join("\n")
15
17
 
16
- raw_px=<<EOF
18
+ @raw_doc=<<EOF
17
19
  <?polyrex schema='items[direction]/item[label, connection, shape]' delimiter =' # '?>
18
20
  direction: TB
19
-
21
+ #{plaintext}
20
22
  EOF
21
23
 
22
- @pxg = PxGraphViz.new(raw_px + plaintext)
24
+ @pxg = PxGraphViz.new(@raw_doc)
23
25
 
24
26
  end
25
27
 
@@ -50,7 +52,8 @@ EOF
50
52
  x[0] = nil
51
53
  else
52
54
  k = 1
53
- x[0] << ' # ' + (b ? :yes : :no).to_s
55
+ x[0] << ' # ' + (b ? :yes : :no).to_s unless b.nil?
56
+ b = nil
54
57
  end
55
58
 
56
59
  scan x[1..-1],j+k, b if x.length > 1
@@ -60,6 +63,4 @@ EOF
60
63
 
61
64
  end
62
65
 
63
- end
64
-
65
-
66
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowchartviz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file