Class: TestFileFinder::FileFinder
- Inherits:
-
Object
- Object
- TestFileFinder::FileFinder
- Defined in:
- lib/test_file_finder/file_finder.rb
Instance Attribute Summary collapse
-
#strategies ⇒ Object
readonly
Returns the value of attribute strategies.
Instance Method Summary collapse
-
#initialize(paths: []) ⇒ FileFinder
constructor
A new instance of FileFinder.
- #test_files ⇒ Object
- #use(strategy) ⇒ Object
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
#strategies ⇒ Object (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_files ⇒ Object
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 |