Class: RubyCritic::SourceLocator

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

Constant Summary collapse

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

Instance Method Summary collapse

Constructor Details

#initialize(paths) ⇒ SourceLocator

Returns a new instance of SourceLocator.


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

def initialize(paths)
  @initial_paths = Array(paths)
end

Instance Method Details

#pathnamesObject


18
19
20
# File 'lib/rubycritic/source_locator.rb', line 18

def pathnames
  @pathnames ||= expand_paths
end

#pathsObject


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

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