class Csv2Psql::Analyzers::Boolean

Bolean value matcher

Constants

BOOLEAN_VALUES
CLASS
FALSE_VALUES
TRUE_VALUES
TYPE
WEIGHT

Public Class Methods

analyze(val) click to toggle source
# File lib/csv2psql/analyzer/types/boolean.rb, line 34
def analyze(val)
  return false if val.nil? || val.empty?
  BOOLEAN_VALUES.index(val) != nil
end
convert(val) click to toggle source
# File lib/csv2psql/analyzer/types/boolean.rb, line 39
def convert(val)
  val.downcase
end