Class: Unzip
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Unzip
- Defined in:
- app/models/unzip.rb
Overview
typed: false
Instance Method Summary collapse
Instance Method Details
#compute_target_dir_path ⇒ Object
5 6 7 |
# File 'app/models/unzip.rb', line 5 def compute_target_dir_path self.target_dir_path = File.join(File.dirname(self.zip_file_path), File.basename(self.zip_file_path, ".zip")) end |
#run_on_current_host__unsafe ⇒ Object
9 10 11 |
# File 'app/models/unzip.rb', line 9 def run_on_current_host__unsafe `unzip #{self.zip_file_path} -d #{self.target_dir_path}` # TODO: security issue end |