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
Returns the current configuration @return [Configuration] current configuration
# File lib/honey_format.rb, line 27 def self.config configure end
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
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
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
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