Class: CC::Analyzer::PathEntries
- Inherits:
-
Object
- Object
- CC::Analyzer::PathEntries
- Defined in:
- lib/cc/analyzer/path_entries.rb
Instance Method Summary collapse
- #entries ⇒ Object
-
#initialize(initial_path) ⇒ PathEntries
constructor
A new instance of PathEntries.
Constructor Details
#initialize(initial_path) ⇒ PathEntries
Returns a new instance of PathEntries.
4 5 6 |
# File 'lib/cc/analyzer/path_entries.rb', line 4 def initialize(initial_path) @initial_path = initial_path.gsub(%r{/$}, "") end |
Instance Method Details
#entries ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/cc/analyzer/path_entries.rb', line 8 def entries if File.directory?(initial_path) all_entries.reject do |path| path.end_with?("/.") || path.start_with?(".git/") end else initial_path end end |