lib/easy_csv.rb
# Returns csv file contents in a string array, or nil if file does not exist.
Returns csv file contents in a string array, or nil if file does not exist.
Returns csv file contents in a string array or nil if file does not exist .
def read(path)
    return nil unless File.exist?(path)
    file_contents = []
    CSV.read(path).each do |contents|
      contents.each do |item|
        file_contents.push(item)
      end
    end
    file_contents
  end
def read ( path ) return nil unless File . exist? ( path ) file_contents = [ ] CSV . read ( path ) . each do | contents | contents . each do | item | file_contents . push ( item ) end end file_contents end
Returns csv file contents in a string array, or nil if file does not exist.
Returns csv file contents in a string array or nil if file does not exist .
path
<not_specific>