Class: Reek::Source::SourceLocator

Inherits:
Object
  • Object
show all
Defined in:
lib/reek/source/source_locator.rb

Overview

Finds Ruby source files in a filesystem.

Instance Method Summary collapse

Constructor Details

#initialize(paths) ⇒ SourceLocator

Returns a new instance of SourceLocator


9
10
11
# File 'lib/reek/source/source_locator.rb', line 9

def initialize(paths)
  @paths = paths.map { |path| path.chomp('/') }
end

Instance Method Details

#all_sourcesObject


13
14
15
# File 'lib/reek/source/source_locator.rb', line 13

def all_sources
  valid_paths.map { |path| File.new(path).to_reek_source }
end