class Treedent::FormattedOutput

Public Instance Methods

to_s() click to toggle source
# File lib/treedent/formatted_output.rb, line 4
def to_s
  tree.map { |node| NodeDrawing.new(node).to_s }.join
end

Private Instance Methods

indented_lines() click to toggle source
# File lib/treedent/formatted_output.rb, line 14
def indented_lines
  input.lines.map { |line| IndentedLine.from(line) }
end
tree() click to toggle source
# File lib/treedent/formatted_output.rb, line 10
def tree
  Tree.new(indented_lines)
end