Class: Scanner

Inherits:
Object
  • Object
show all
Defined in:
lib/data_tree/scanner.rb

Instance Method Summary collapse

Instance Method Details

#scan(root) ⇒ Object



3
4
5
6
7
8
# File 'lib/data_tree/scanner.rb', line 3

def scan(root)
  path_arr = []
  root = Pathname.new(root)
  root.find { |v| path_arr << v }
  Tree.new.make_tree(path_arr, root)
end