Skip to content

Commit bcacd7e

Browse files
Shreyas Balakrishnashreyasbharath
Shreyas Balakrishna
authored andcommitted
fixup! Blah
1 parent efb49ca commit bcacd7e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/cpp_dependency_graph/directory_parser.rb

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
module DirectoryParser
2+
def fetch_all_dirs(root_dir)
3+
Find.find(root_dir).select { |e| File.directory?(e) }
4+
end
5+
26
def glob_files(path, extensions)
37
path = File.join(path, File::SEPARATOR) + '*' + extensions
48
Dir.glob(path).select { |entry| File.file?(entry) }.compact

lib/cpp_dependency_graph/project.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
require 'find'
44

5+
require_relative 'directory_parser'
56
require_relative 'include_to_component_resolver'
67
require_relative 'source_component'
78

89
# Parses all components of a project
910
class Project
11+
include DirectoryParser
12+
1013
def initialize(path)
1114
@path = path
1215
@include_resolver = IncludeToComponentResolver.new(source_components)
@@ -54,7 +57,4 @@ def build_source_components
5457
components.delete_if { |_, v| v.source_files.size.zero? }
5558
end
5659

57-
def fetch_all_dirs(source_dir)
58-
Find.find(source_dir).select { |e| File.directory?(e) }
59-
end
6060
end

0 commit comments

Comments
 (0)