Class: RubyAstVisualizer::Core
- Inherits:
-
Object
- Object
- RubyAstVisualizer::Core
- Defined in:
- lib/ruby_ast_visualizer.rb
Instance Method Summary collapse
-
#initialize(source) ⇒ Core
constructor
A new instance of Core.
- #reconfigure ⇒ Object
Constructor Details
#initialize(source) ⇒ Core
Returns a new instance of Core.
6 7 8 9 |
# File 'lib/ruby_ast_visualizer.rb', line 6 def initialize(source) @node_id = 0 @source = source end |
Instance Method Details
#reconfigure ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/ruby_ast_visualizer.rb', line 11 def reconfigure g = GraphViz.new(:G, type: :digraph) node = Parser::CurrentRuby.parse(@source) _reconfigure(g, node) g end |