Class: CC::Analyzer::IncludePathsBuilder
- Inherits:
-
Object
- Object
- CC::Analyzer::IncludePathsBuilder
- Defined in:
- lib/cc/analyzer/include_paths_builder.rb
Defined Under Namespace
Classes: Directory
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(cc_exclude_paths) ⇒ IncludePathsBuilder
constructor
A new instance of IncludePathsBuilder.
Constructor Details
#initialize(cc_exclude_paths) ⇒ IncludePathsBuilder
Returns a new instance of IncludePathsBuilder.
10 11 12 |
# File 'lib/cc/analyzer/include_paths_builder.rb', line 10 def initialize(cc_exclude_paths) @cc_exclude_paths = cc_exclude_paths end |
Class Method Details
.relevant_entries(path) ⇒ Object
4 5 6 7 8 |
# File 'lib/cc/analyzer/include_paths_builder.rb', line 4 def self.relevant_entries(path) Dir.entries(path).reject do |e| %w(. .. .git).include?(e) end end |
Instance Method Details
#build ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/cc/analyzer/include_paths_builder.rb', line 14 def build root = Directory.new('.', ignored_files) paths = root.included_paths paths.each do |path| raise_on_unreadable_files(path) end end |