Class: Chronicle::ETL::FileExtractor
- Inherits:
-
Extractor
- Object
- Extractor
- Chronicle::ETL::FileExtractor
show all
- Defined in:
- lib/chronicle/etl/extractors/file_extractor.rb
Overview
Return filenames that match a pattern in a directory
Instance Attribute Summary
#connector_registration
Instance Method Summary
collapse
Methods inherited from Extractor
#initialize
#register_connector
included
Instance Method Details
23
24
25
26
27
|
# File 'lib/chronicle/etl/extractors/file_extractor.rb', line 23
def
@pathnames.each do |pathname|
yield Chronicle::ETL::Extraction.new(data: pathname.to_path)
end
end
|
#prepare ⇒ Object
19
20
21
|
# File 'lib/chronicle/etl/extractors/file_extractor.rb', line 19
def prepare
@pathnames = gather_files
end
|
#results_count ⇒ Object
29
30
31
|
# File 'lib/chronicle/etl/extractors/file_extractor.rb', line 29
def results_count
@pathnames.count
end
|