module CsvImportAnalyzer
file_type_assertion.rb
Public Instance Methods
process(filename, options = {})
click to toggle source
main public interface to the library makes sure that the file exists and passes the file and any additional options given to CsvSanitizer
returns FileNotFound
if given file is invalid
# File lib/csv-import-analyzer.rb, line 13 def process(filename, options = {}) return ArgumentError.new("A valid file needed to process") if filename.nil? if File::exist?(filename) CsvImportAnalyzer::CsvSanitizer.new().process(File.absolute_path(filename), options) else FileNotFound.new end end