Class: Rubycritic::SourceLocator

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

Constant Summary collapse

RUBY_EXTENSION =
".rb"
RUBY_FILES =
File.join("**", "*#{RUBY_EXTENSION}")

Instance Method Summary collapse

Constructor Details

#initialize(dirs) ⇒ SourceLocator

Returns a new instance of SourceLocator.



7
8
9
# File 'lib/rubycritic/source_locator.rb', line 7

def initialize(dirs)
  @dirs = dirs
end

Instance Method Details

#pathnamesObject



11
12
13
# File 'lib/rubycritic/source_locator.rb', line 11

def pathnames
  @pathnames ||= expand_paths
end

#pathsObject



15
16
17
# File 'lib/rubycritic/source_locator.rb', line 15

def paths
  @paths ||= pathnames.map(&:to_s)
end