Sha256: 3643194fd5c88c3ada26ec97c650b93100521fc28c9182337a93df831d2c6468

Contents?: true

Size: 1.24 KB

Versions: 3

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

require 'honey_format/converters/header_column_converter'
require 'honey_format/converters/convert_boolean'
require 'honey_format/converters/convert_date_and_time'
require 'honey_format/converters/convert_number'
require 'honey_format/converters/convert_string'

module HoneyFormat
  # Convert to nil
  ConvertNil = proc {}

  module Converters
    DEFAULT = {
      # strict variants
      decimal!: StrictConvertDecimal,
      integer!: StrictConvertInteger,
      date!: StrictConvertDate,
      datetime!: StrictConvertDatetime,
      symbol!: StrictConvertSymbol,
      downcase!: StrictConvertDowncase,
      upcase!: StrictConvertUpcase,
      boolean!: StrictConvertBoolean,
      # safe variants
      decimal: ConvertDecimal,
      decimal_or_zero: ConvertDecimalOrZero,
      integer: ConvertInteger,
      integer_or_zero: ConvertIntegerOrZero,
      date: ConvertDate,
      datetime: ConvertDatetime,
      symbol: ConvertSymbol,
      downcase: ConvertDowncase,
      upcase: ConvertUpcase,
      boolean: ConvertBoolean,
      md5: ConvertMD5,
      hex: ConvertHex,
      nil: ConvertNil,
      blank: ConvertBlank,
      header_column: ConvertHeaderColumn,
      method_name: ConvertHeaderColumn,
    }.freeze
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
honey_format-0.23.0 lib/honey_format/converters/converters.rb
honey_format-0.22.0 lib/honey_format/converters/converters.rb
honey_format-0.21.1 lib/honey_format/converters/converters.rb