Method: TTY::Tree::DirectoryRenderer#initialize

Defined in:
lib/tty/tree/directory_renderer.rb

#initialize(nodes, options = {}) ⇒ DirectoryRenderer

Returns a new instance of DirectoryRenderer.


20
21
22
23
24
25
# File 'lib/tty/tree/directory_renderer.rb', line 20

def initialize(nodes, options = {})
  @nodes  = nodes
  @indent = options.fetch(:indent, 4)
  @pipe_mark  = MARKERS[:unicode][:pipe] + ' ' * [@indent - 1, 0].max
  @space_mark = ' ' * @indent
end