class Prism::DotVisitor

def visit_ensure_node(node)

Visit a EnsureNode node.
def visit_ensure_node(node)
  table = Table.new("EnsureNode")
  id = node_id(node)
  # ensure_keyword_loc
  table.field("ensure_keyword_loc", location_inspect(node.ensure_keyword_loc))
  # statements
  unless (statements = node.statements).nil?
    table.field("statements", port: true)
    digraph.edge("#{id}:statements -> #{node_id(statements)};")
  end
  # end_keyword_loc
  table.field("end_keyword_loc", location_inspect(node.end_keyword_loc))
  digraph.nodes << <<~DOT
    #{id} [
      label=<#{table.to_dot.gsub(/\n/, "\n  ")}>
    ];
  DOT
  super
end