class SyntaxTree::MermaidVisitor

This visitor transforms the AST into a mermaid flow chart.

Attributes

flowchart[R]
target[R]

Public Class Methods

new() click to toggle source
# File lib/syntax_tree/mermaid_visitor.rb, line 8
def initialize
  @flowchart = Mermaid.flowchart
  @target = nil
end

Public Instance Methods

visit_program(node) click to toggle source
Calls superclass method SyntaxTree::FieldVisitor#visit_program
# File lib/syntax_tree/mermaid_visitor.rb, line 13
def visit_program(node)
  super
  flowchart.render
end