class CsvImportAnalyzer::Analyzer::FileTypeAssertion

Public Instance Methods

check_file_type(filename) click to toggle source
# File lib/csv-import-analyzer/analyzer/file_type_assertion.rb, line 6
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
convert_excel_to_csv() click to toggle source
# File lib/csv-import-analyzer/analyzer/file_type_assertion.rb, line 18
def convert_excel_to_csv

end