Class: Testgenai::Scanner::FileExistenceScanner

Inherits:
Base
  • Object
show all
Defined in:
lib/testgenai/scanner/file_existence_scanner.rb

Instance Attribute Summary

Attributes inherited from Base

#files_scanned

Instance Method Summary collapse

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

#scanObject



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