Module: TaliaCore::DataTypes::PathHelpers::ClassMethods

Included in:
FileRecord
Defined in:
lib/talia_core/data_types/path_helpers.rb

Instance Method Summary collapse

Instance Method Details

#data_pathObject

Path used to store data files.



14
15
16
# File 'lib/talia_core/data_types/path_helpers.rb', line 14

def data_path
  @@data_path ||= File.join(TALIA_ROOT, 'data')
end

#extract_filename(file_data) ⇒ Object

Extract the filename.



21
22
23
# File 'lib/talia_core/data_types/path_helpers.rb', line 21

def extract_filename(file_data)
  file_data.original_filename if file_data.respond_to?(:original_filename)
end

#tempfile_pathObject

Path used to store temporary files.



9
10
11
# File 'lib/talia_core/data_types/path_helpers.rb', line 9

def tempfile_path
  @@tempfile_path ||= File.join(TALIA_ROOT, 'tmp', 'data_records')
end