Class: TreeGraph::BottomUp
- Inherits:
-
Object
- Object
- TreeGraph::BottomUp
show all
- Includes:
- Node
- Defined in:
- lib/tree_graph.rb
Instance Attribute Summary
Attributes included from Node
#is_last, #parent, #raw_node
Instance Method Summary
collapse
Methods included from Node
#ancestors, #children, #children_nodes, #indent, #initialize, #level, #levels
Instance Method Details
#branch ⇒ Object
83
84
85
86
|
# File 'lib/tree_graph.rb', line 83
def branch
return '' unless parent
is_last ? '┌─' : '├─'
end
|
#tree_graph ⇒ Object
79
80
81
|
# File 'lib/tree_graph.rb', line 79
def tree_graph
levels.reverse.join("\n")
end
|