module HoneyFormat

Main module for HoneyFormat

Constants

ConvertBlank

Convert to blank string

ConvertBoolean

Tries to convert value boolean to, returns nil if it can’t convert

ConvertDate

Convert to date

ConvertDatetime

Convert to datetime

ConvertDecimal

Converts decimal or nil

ConvertDecimalOrZero

Converts to decimal or zero

ConvertDowncase

Convert to downcase or nil

ConvertHeaderColumn

Convert header column

ConvertHex

Convert to hex or nil

ConvertInteger

Convert to integer or nil

ConvertIntegerOrZero

Convert to integer or zero

ConvertMD5

Convert to md5 or nil

ConvertNil

Convert to nil

ConvertStrip

Convert to stripped string

ConvertSymbol

Convert to symbol or nil

ConvertUpcase

Convert to upcase or nil

FALSY

String values considered falsy

HoneyCSV

CSV alias

StrictConvertBoolean

Convert to boolean or raise error

StrictConvertDate

Convert to date or raise error

StrictConvertDatetime

Convert to datetime or raise error

StrictConvertDecimal

Convert to decimal or raise error

StrictConvertDowncase

Convert to downcase or raise error

StrictConvertInteger

Convert to integer or raise error

StrictConvertStrip

Convert to downcase or raise error

StrictConvertSymbol

Convert to symbol or raise error

StrictConvertUpcase

Convert to upcase or raise error

TRUTHY

String values considered truthy

VERSION

Gem version

Public Class Methods

config() click to toggle source

Returns the current configuration @return [Configuration] current configuration

# File lib/honey_format.rb, line 27
def self.config
  configure
end
configure() { |configuration| ... } click to toggle source

Configure HoneyFormat @yield [configuration] the configuration @yieldparam [Configuration] current configuration @return [Configuration] current configuration

# File lib/honey_format.rb, line 19
def self.configure
  @configuration ||= Configuration.new
  yield(@configuration) if block_given?
  @configuration
end
converter_registry() click to toggle source

Returns the configured converter registry @return [Registry] the current converter registry

# File lib/honey_format.rb, line 39
def self.converter_registry
  config.converter_registry
end
header_converter() click to toggle source

Returns the configured header converter @return [#call] the current header converter

# File lib/honey_format.rb, line 33
def self.header_converter
  config.header_converter
end
header_deduplicator_registry() click to toggle source

Returns the configured deduplicator registry @return [Registry] the current deduplicator registry

# File lib/honey_format.rb, line 45
def self.header_deduplicator_registry
  config.header_deduplicator_registry
end