Class: Spandx::Core::PathTraversal
- Inherits:
-
Object
- Object
- Spandx::Core::PathTraversal
- Defined in:
- lib/spandx/core/path_traversal.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(root, recursive: true) ⇒ PathTraversal
constructor
A new instance of PathTraversal.
Constructor Details
#initialize(root, recursive: true) ⇒ PathTraversal
Returns a new instance of PathTraversal.
8 9 10 11 |
# File 'lib/spandx/core/path_traversal.rb', line 8 def initialize(root, recursive: true) @root = Pathname.new(root) @recursive = recursive end |
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
6 7 8 |
# File 'lib/spandx/core/path_traversal.rb', line 6 def root @root end |
Instance Method Details
#each(&block) ⇒ Object
13 14 15 |
# File 'lib/spandx/core/path_traversal.rb', line 13 def each(&block) each_file_in(root, &block) end |