astarisk 0.1.0 → 0.2.0

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
  SHA256:
3
- metadata.gz: 89c3ad862d9e7f790afd1b44a6d596f6fd1a8e26fe112513af7cff6babffdc3c
4
- data.tar.gz: f63aa540c158fc02fdec3e4000afa68a6b5b2b319cc658ef59c0ace2a8d40733
3
+ metadata.gz: 6dca79170dfda2b56c042dbf5e20ce14e4e2050038c7b1d530ebbf4eacc9930d
4
+ data.tar.gz: 5e008ce9f96ed6a6f2515ac174d38ae870a79eec561d32eaa8f8e0dd601b5412
5
5
  SHA512:
6
- metadata.gz: d53e9fcd2d09bbd110807fe414940b9e84512107576336b08cb5cc340c37328ccd4133c2ac78ee5c6104cf87414a855c8264492c43180992c68bf3a222f9541f
7
- data.tar.gz: 0eac090ddb93559896f5df6bd70ef18d90102ee11a8c135d02522373c0e3d34db22afc20f056cc772233359fc528b9dde49d89ea3193e6808c54cc2ad6f667fc
6
+ metadata.gz: 5b98718fcb9ebf53ab94818a7c3af7c2ac2943c3684ad0b44285e4dd598256fd850c5d814917371baff4c9cc7bd7a492ab751b8bd677c6f343892a353c124da2
7
+ data.tar.gz: e986f3be7a058d4de4a6598614b48e14480b8435c5b50900e53b9f8d5ff29b22217112fe1364c1696ff0382dab6205be88484b55818d08cca8a50147216b8776
data/README.md CHANGED
@@ -86,6 +86,20 @@ Keyword arguments:
86
86
  * out: output I/O to draw graph (default: `STDERR`)
87
87
  * mode: symbol to specify `:compact` mode (default: `:normal`)
88
88
 
89
+ Return value: `nil`
90
+
91
+ ### Astarisk.draw_graph
92
+
93
+ Draw a graph and return it as a `String`
94
+
95
+ Argument:
96
+ * AST node (an instance of `RubyVM::AbstractSyntaxTree::Node`)
97
+
98
+ Keyword arguments:
99
+ * mode: symbol to specify `:compact` mode (default: `:normal`)
100
+
101
+ Return value: a `String` of graph
102
+
89
103
  ## Contributing
90
104
 
91
105
  Bug reports and pull requests are welcome on GitHub at https://github.com/tagomoris/astarisk.
@@ -10,7 +10,8 @@ end
10
10
 
11
11
  module Astarisk
12
12
  def self.draw(node, out: STDERR, mode: :normal)
13
- STDERR.print draw_graph(node, mode: mode)
13
+ out.print draw_graph(node, mode: mode)
14
+ nil
14
15
  end
15
16
 
16
17
  def self.stringify_node(node)
@@ -1,3 +1,3 @@
1
1
  module Astarisk
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: astarisk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi