Class: Slimembedcop::PathFinder
- Inherits:
-
Object
- Object
- Slimembedcop::PathFinder
- Defined in:
- lib/slimembedcop/path_finder.rb
Overview
Collect file paths from given path patterns.
Instance Method Summary collapse
-
#initialize(options, config) ⇒ PathFinder
constructor
A new instance of PathFinder.
- #run ⇒ Object
Constructor Details
#initialize(options, config) ⇒ PathFinder
Returns a new instance of PathFinder.
9 10 11 12 13 |
# File 'lib/slimembedcop/path_finder.rb', line 9 def initialize(, config) @default_patterns = .default_path_patterns @exclude_patterns = config.for_all_cops['Exclude'] || [] @path_patterns = .args end |
Instance Method Details
#run ⇒ Object
15 16 17 |
# File 'lib/slimembedcop/path_finder.rb', line 15 def run matching_paths(patterns) { |path| !excluded?(path) }.sort end |