Sha256: 22b5b13cb816eeacfe9516bbbca44948165f03069325274c284ec1b6510858e1

Contents?: true

Size: 346 Bytes

Versions: 3

Compression:

Stored size: 346 Bytes

Contents

module Daru
  module IO
    module CSV
      CONVERTERS = {
        boolean: lambda { |f, _|
          case f.downcase.strip
          when 'true'
            true
          when 'false'
            false
          else
            f
          end
        },
        string: lambda { |f, _|
          f
        }
      }.freeze
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
daru-0.3 lib/daru/io/csv/converters.rb
daru-0.2.2 lib/daru/io/csv/converters.rb
daru-0.2.1 lib/daru/io/csv/converters.rb