Class: Datafile::ZipWorker
- Inherits:
-
Object
- Object
- Datafile::ZipWorker
- Includes:
- LogUtils::Logging
- Defined in:
- lib/datafile/workers/zip/worker.rb
Overview
check: rename to ZipDatafileWorker?? or ZipDatafile -why, why not ??
Instance Method Summary collapse
- #calc ⇒ Object
- #download ⇒ Object
- #dump ⇒ Object
-
#initialize(datafile) ⇒ ZipWorker
constructor
A new instance of ZipWorker.
- #read ⇒ Object
Constructor Details
#initialize(datafile) ⇒ ZipWorker
Returns a new instance of ZipWorker.
9 10 11 |
# File 'lib/datafile/workers/zip/worker.rb', line 9 def initialize( datafile ) @datafile = datafile end |
Instance Method Details
#calc ⇒ Object
30 31 32 33 34 |
# File 'lib/datafile/workers/zip/worker.rb', line 30 def calc @datafile.scripts.each do |script| script.call end end |
#download ⇒ Object
13 14 15 16 17 |
# File 'lib/datafile/workers/zip/worker.rb', line 13 def download @datafile.datasets.each do |dataset| dataset.zip_worker.download end end |
#dump ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/datafile/workers/zip/worker.rb', line 36 def dump ## also dump inlines @datafile.inlines.each do |inline| inline.dump end @datafile.datasets.each do |dataset| dataset.zip_worker.dump end ## also dump scripts @datafile.scripts.each do |script| script.dump end end |
#read ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/datafile/workers/zip/worker.rb', line 19 def read ## note: also run inlines (setup script) before @datafile.inlines.each do |inline| inline.call end @datafile.datasets.each do |dataset| dataset.zip_worker.read end end |