Class: CC::Analyzer::IncludePathsBuilder::Directory

Inherits:
Object
  • Object
show all
Defined in:
lib/cc/analyzer/include_paths_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, excluded_files) ⇒ Directory

Returns a new instance of Directory.



51
52
53
54
# File 'lib/cc/analyzer/include_paths_builder.rb', line 51

def initialize(path, excluded_files)
  @path = path
  @excluded_files = ensure_hashified(excluded_files)
end

Instance Method Details

#all_included?Boolean

Returns:

  • (Boolean)


56
57
58
59
60
# File 'lib/cc/analyzer/include_paths_builder.rb', line 56

def all_included?
  readable_by_all? &&
    files_all_included? &&
    subdirectories_all_included?
end

#included_pathsObject



62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/cc/analyzer/include_paths_builder.rb', line 62

def included_paths
  if all_included?
    [@path + "/"]
  elsif readable_by_all?
    result = []
    result += included_file_entries
    result += included_subdirectory_results
    result
  else
    []
  end
end