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.


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

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

Instance Method Details

#pathnamesObject


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

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