Class: Remi::Loader::LocalFile
- Inherits:
-
Remi::Loader
- Object
- Remi::Loader
- Remi::Loader::LocalFile
- Defined in:
- lib/remi/data_subjects/local_file.rb
Overview
Local file loader Used to output files to a local filesystem
Instance Attribute Summary
Attributes inherited from Remi::Loader
Instance Method Summary collapse
-
#initialize(*args, **kargs) ⇒ LocalFile
constructor
A new instance of LocalFile.
-
#load(data) ⇒ true
Moves the file from the temporary workspace to another local path.
Methods inherited from Remi::Loader
Constructor Details
#initialize(*args, **kargs) ⇒ LocalFile
Returns a new instance of LocalFile.
89 90 91 92 |
# File 'lib/remi/data_subjects/local_file.rb', line 89 def initialize(*args, **kargs) super init_local_file_loader(*args, **kargs) end |
Instance Method Details
#load(data) ⇒ true
Moves the file from the temporary workspace to another local path
97 98 99 100 |
# File 'lib/remi/data_subjects/local_file.rb', line 97 def load(data) logger.info "Writing file #{@local_path}" FileUtils.mv(data, @local_path) end |