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.



53
54
55
56
# File 'lib/cc/analyzer/include_paths_builder.rb', line 53

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

Instance Method Details

#all_included?Boolean

Returns:

  • (Boolean)


58
59
60
61
62
# File 'lib/cc/analyzer/include_paths_builder.rb', line 58

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

#included_pathsObject



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

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