class CsvHelper::Base

Constants

CSV_RESULTS_DIR

Public Class Methods

new(result_id) click to toggle source
# File lib/csv_helper/base.rb, line 6
def initialize(result_id)
  @result_id = result_id
  @tmp_results_dir = File.join(Rails.root, CSV_RESULTS_DIR)
  FileUtils.mkdir_p(@tmp_results_dir)
end

Public Instance Methods

filename() click to toggle source
# File lib/csv_helper/base.rb, line 16
def filename
  "#{@result_id}.csv"
end
filepath() click to toggle source
# File lib/csv_helper/base.rb, line 12
def filepath
  File.join(@tmp_results_dir, filename)
end