Class: Inferno::Terminology::Tasks::CleanupPrecursors
- Inherits:
-
Object
- Object
- Inferno::Terminology::Tasks::CleanupPrecursors
- Includes:
- TempDir
- Defined in:
- lib/inferno/terminology/tasks/cleanup_precursors.rb
Instance Attribute Summary collapse
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(version:) ⇒ CleanupPrecursors
constructor
A new instance of CleanupPrecursors.
- #run ⇒ Object
Methods included from TempDir
#pipe_files, #umls_dir, #umls_subset_dir, #umls_zip_path, #versioned_temp_dir
Constructor Details
#initialize(version:) ⇒ CleanupPrecursors
Returns a new instance of CleanupPrecursors.
11 12 13 |
# File 'lib/inferno/terminology/tasks/cleanup_precursors.rb', line 11 def initialize(version:) @version = version end |
Instance Attribute Details
#version ⇒ Object (readonly)
Returns the value of attribute version.
9 10 11 |
# File 'lib/inferno/terminology/tasks/cleanup_precursors.rb', line 9 def version @version end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/inferno/terminology/tasks/cleanup_precursors.rb', line 15 def run Inferno.logger.info "removing terminology precursor files in #{versioned_temp_dir}" FileUtils.remove_dir(umls_dir, true) FileUtils.remove_dir(umls_subset_dir, true) FileUtils.rm(umls_zip_path, force: true) FileUtils.rm(pipe_files, force: true) end |