Class: Bulkrax::SampleCsvService::FilePathGenerator
- Inherits:
-
Object
- Object
- Bulkrax::SampleCsvService::FilePathGenerator
- Defined in:
- app/services/bulkrax/sample_csv_service/file_path_generator.rb
Overview
Utility classes
Class Method Summary collapse
Class Method Details
.default_path ⇒ Object
6 7 8 9 10 |
# File 'app/services/bulkrax/sample_csv_service/file_path_generator.rb', line 6 def self.default_path path = Rails.root.join('tmp', 'imports', "bulkrax_template_#{}.csv") FileUtils.mkdir_p(path.dirname.to_s) path end |
.timestamp ⇒ Object
12 13 14 |
# File 'app/services/bulkrax/sample_csv_service/file_path_generator.rb', line 12 def self. Time.current.utc.strftime('%Y%m%d_%H%M%S') end |