Class: Testgenai::Scanner::FileExistenceScanner
- Defined in:
- lib/testgenai/scanner/file_existence_scanner.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(root: Dir.pwd) ⇒ FileExistenceScanner
constructor
A new instance of FileExistenceScanner.
- #scan ⇒ Object
Constructor Details
#initialize(root: Dir.pwd) ⇒ FileExistenceScanner
Returns a new instance of FileExistenceScanner.
4 5 6 |
# File 'lib/testgenai/scanner/file_existence_scanner.rb', line 4 def initialize(root: Dir.pwd) @root = root end |
Instance Method Details
#scan ⇒ Object
8 9 10 11 12 |
# File 'lib/testgenai/scanner/file_existence_scanner.rb', line 8 def scan files = source_files @files_scanned = files.size files.reject { |f| test_exists?(f) }.flat_map { |f| extract_methods(f) } end |