struct Sheen::Tree::Painter

Overview

Renders a Node to a string. A short-lived collaborator is constructed per render from the active Config defined.

Defined in:

sheen/tree_painter.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(config : Config) #

[View source]

Instance Method Detail

def render(node : Node, root : Bool, prefix : String) : String #

Renders node to a string.

root prints the node's own value as the first line and is false while descending. *prefix is the accumulated ancestor indent prepended to every line of the subtree.


[View source]