Sha256: d2ac7b0173426230ec443322079f5891b2eb42bf68d9f32c1fc50aa18a262694

Contents?: true

Size: 603 Bytes

Versions: 3

Compression:

Stored size: 603 Bytes

Contents

# file_type_assertion.rb
require 'pry'
module CsvImportAnalyzer
  module Analyzer
    class FileTypeAssertion

      def check_file_type(filename)
        extension = File.absolute_path(filename).split(".").last
        if extension == "csv"
          Analyzer::FileTypeAssertion.new("sampleTab.csv")
        #Try adding support for non csv files - xlsx, xls in future
        elsif extension == "xlsx"
          puts "xlsx"
        else
          # return UnsupportedFileFormat.new
        end
      end

      def self.convert_excel_to_csv

      end

      def csv_clean

      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
csv-import-analyzer-0.0.3 lib/csv-import-analyzer/analyzer/file_type_assertion.rb
csv-import-analyzer-0.0.2 lib/csv-import-analyzer/analyzer/file_type_assertion.rb
csv-import-analyzer-0.0.1 lib/csv-import-analyzer/analyzer/file_type_assertion.rb