Class: Datanorm::Documents::Preprocess
- Inherits:
-
Object
- Object
- Datanorm::Documents::Preprocess
- Includes:
- Calls, Logging
- Defined in:
- lib/datanorm/documents/preprocess.rb
Overview
Takes an entire Datanorm file and writes many small text files from it so that the content can later be iterated over in an efficient way.
Instance Method Summary collapse
Methods included from Logging
Instance Method Details
#call ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/datanorm/documents/preprocess.rb', line 15 def call FileUtils.mkdir_p(workdir) file.each do |record| ::Datanorm::Documents::Preprocesses::Process.call(workdir:, record:) progress.increment! if yield_progress yield nil, progress # No items to yield during preprocess. end end end |