Module: Renalware::UsingTempFolder

Extended by:
ActiveSupport::Concern
Included in:
HD::SessionForms::BatchPrintJob, Letters::Printing::BatchPrintJob
Defined in:
app/models/concerns/renalware/using_temp_folder.rb

Instance Method Summary collapse

Instance Method Details

#in_a_temporary_folderObject



7
8
9
10
11
12
# File 'app/models/concerns/renalware/using_temp_folder.rb', line 7

def in_a_temporary_folder
  Dir.mktmpdir(nil, Rails.root.join("tmp").to_s) do |dir|
    yield Pathname(dir)
    # temp dir removed here
  end
end