Sha256: b88e9664af2cb72cb97b1bee5370ed25bc782928f9788969db25ac6aa5bd9e30

Contents?: true

Size: 552 Bytes

Versions: 5

Compression:

Stored size: 552 Bytes

Contents

# file_type_assertion.rb
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 convert_excel_to_csv

      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
csv-import-analyzer-0.0.9 lib/csv-import-analyzer/analyzer/file_type_assertion.rb
csv-import-analyzer-0.0.8 lib/csv-import-analyzer/analyzer/file_type_assertion.rb
csv-import-analyzer-0.0.7 lib/csv-import-analyzer/analyzer/file_type_assertion.rb
csv-import-analyzer-0.0.6 lib/csv-import-analyzer/analyzer/file_type_assertion.rb
csv-import-analyzer-0.0.5 lib/csv-import-analyzer/analyzer/file_type_assertion.rb