Class: DevSuite::DirectoryTree::Visualizer::Tree

Inherits:
Base show all
Defined in:
lib/dev_suite/directory_tree/visualizer/tree.rb

Instance Method Summary collapse

Methods inherited from Utils::Construct::Component::Base

component_key

Instance Method Details

#visualize(path) ⇒ Object

Visualizes the directory tree

Parameters:

  • path (String)

    The base path of the directory



9
10
11
12
13
14
15
16
17
18
# File 'lib/dev_suite/directory_tree/visualizer/tree.rb', line 9

def visualize(path)
  path = Pathname.new(path)
  validate_path!(path)
  validate_size!(path)

  root = build_root_node(path)
  output = render_output(root)

  puts output
end