Class: DirTree
- Inherits:
-
Object
- Object
- DirTree
- Includes:
- Config
- Defined in:
- lib/cpp_dependency_graph/dir_tree.rb
Overview
Returns a root directory as a tree of directories
Instance Attribute Summary collapse
-
#tree ⇒ Object
readonly
Returns the value of attribute tree.
Instance Method Summary collapse
-
#initialize(path) ⇒ DirTree
constructor
A new instance of DirTree.
Methods included from Config
Constructor Details
#initialize(path) ⇒ DirTree
Returns a new instance of DirTree.
13 14 15 |
# File 'lib/cpp_dependency_graph/dir_tree.rb', line 13 def initialize(path) @tree ||= File.directory?(path) ? parse_dirs(path) : {} end |
Instance Attribute Details
#tree ⇒ Object (readonly)
Returns the value of attribute tree.
11 12 13 |
# File 'lib/cpp_dependency_graph/dir_tree.rb', line 11 def tree @tree end |