class Prism::DotVisitor - Documentation for Ruby 4.1
Description: class Prism::DotVisitor: This visitor provides the ability to call Node#to_dot, which converts a subtree into a graphviz dot graph.
Keywords: ruby,class,Prism::DotVisitor

🔍

No recent searches

# class Prism::DotVisitor

This visitor provides the ability to call `Node#to_dot`, which converts a subtree into a graphviz dot graph.

### Attributes

digraph [R]

The digraph that is being built.

### Public Class Methods

new ()
Source

    # File lib/prism/dot_visitor.rb, line 128
    def initialize
      @digraph = Digraph.new
    end

Initialize a new dot visitor.

### Public Instance Methods

to_dot ()
Source

    # File lib/prism/dot_visitor.rb, line 135
    def to_dot
      digraph.to_dot
    end

Convert this visitor into a graphviz dot graph string.