Sha256: fadad84b97900f02a58da7b616f9a24e4970c580182fb052f3432767460e7b89

Contents?: true

Size: 354 Bytes

Versions: 6

Compression:

Stored size: 354 Bytes

Contents

module CsvImportAnalyzer
  module Helper
    ###
    # To determine if a certain field in the dataset of null type
    # returns a boolean of it's either null or not
    ###
    def null_like?(value)
      if ["NULL", "Null", "NUll", "NULl", "null", nil, "", "NAN", "\\N"].include?(value)
        true
      else
        false
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
csv-import-analyzer-0.0.9 lib/csv-import-analyzer/helpers/common_functions.rb
csv-import-analyzer-0.0.8 lib/csv-import-analyzer/helpers/common_functions.rb
csv-import-analyzer-0.0.7 lib/csv-import-analyzer/helpers/common_functions.rb
csv-import-analyzer-0.0.6 lib/csv-import-analyzer/helpers/common_functions.rb
csv-import-analyzer-0.0.5 lib/csv-import-analyzer/helpers/common_functions.rb
csv-import-analyzer-0.0.4 lib/csv-import-analyzer/helpers/common_functions.rb