Sha256: 28d234a193aa88267b67fc750a3cc83f35218606f0078834f719abcec1cce34b

Contents?: true

Size: 420 Bytes

Versions: 16

Compression:

Stored size: 420 Bytes

Contents

require 'fileutils'
module CsvHelper
  class Local < Base
    attr_reader :url
    LOCAL_RESULT_CSV = 'local_result_csvs'

    def initialize(result_id)
      super(result_id)
      FileUtils.mkdir_p(File.join('public', LOCAL_RESULT_CSV))
      @url = File.join(LOCAL_RESULT_CSV, filename)
      @local_url = File.join('public', @url)
    end

    def store!
      FileUtils.copy(filepath, @local_url)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
aleph_analytics-0.4.9.pre.dev lib/csv_helper/local.rb
aleph_analytics-0.4.8 lib/csv_helper/local.rb
aleph_analytics-0.4.7 lib/csv_helper/local.rb
aleph_analytics-0.4.4 lib/csv_helper/local.rb
aleph_analytics-0.4.2 lib/csv_helper/local.rb
aleph_analytics-0.4.1 lib/csv_helper/local.rb
aleph_analytics-0.3.0 lib/csv_helper/local.rb
aleph_analytics-0.2.0 lib/csv_helper/local.rb
aleph_analytics-0.1.0 lib/csv_helper/local.rb
aleph_analytics-0.0.6 lib/csv_helper/local.rb
aleph_analytics-0.0.5 lib/csv_helper/local.rb
aleph_analytics-0.0.4 lib/csv_helper/local.rb
aleph_analytics-0.0.3 lib/csv_helper/local.rb
aleph_analytics-0.0.2 lib/csv_helper/local.rb
aleph_analytics-0.0.1.alpha lib/csv_helper/local.rb
aleph_analytics-0.0.0.alpha lib/csv_helper/local.rb