Class: TestFileFinder::FileFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/test_file_finder/file_finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(paths: []) ⇒ FileFinder

Returns a new instance of FileFinder.



9
10
11
12
# File 'lib/test_file_finder/file_finder.rb', line 9

def initialize(paths: [])
  @paths = [paths].flatten
  @strategies = []
end

Instance Attribute Details

#strategiesObject (readonly)

Returns the value of attribute strategies.



7
8
9
# File 'lib/test_file_finder/file_finder.rb', line 7

def strategies
  @strategies
end

Instance Method Details

#test_filesObject



18
19
20
# File 'lib/test_file_finder/file_finder.rb', line 18

def test_files
  search
end

#use(strategy) ⇒ Object



14
15
16
# File 'lib/test_file_finder/file_finder.rb', line 14

def use(strategy)
  @strategies << strategy
end