Sha256: 3409d32686fdc847db268b8da9fc787814643f98e6240baf6f1c1e3642bf166d

Contents?: true

Size: 984 Bytes

Versions: 4

Compression:

Stored size: 984 Bytes

Contents

require 'honey_format/version'
require 'honey_format/configuration'
require 'honey_format/errors'
require 'honey_format/value_converter'
require 'honey_format/csv'


# Main module for HoneyFormat
module HoneyFormat
  # CSV alias
  HoneyCSV = CSV

  # Configure HoneyFormat
  # @yield [configuration] the configuration
  # @yieldparam [Configuration] current configuration
  # @return [Configuration] current configuration
  def self.configure
    @configuration ||= Configuration.new
    yield(@configuration) if block_given?
    @configuration
  end

  # Returns the current configuration
  # @return [Configuration] current configuration
  def self.config
    configure
  end

  # Returns the configured header converter
  # @return [#call] the current header converter
  def self.header_converter
    config.header_converter
  end

  # Returns the configured value converter
  # @return [#call] the current value converter
  def self.value_converter
    config.converter
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
honey_format-0.16.0 lib/honey_format.rb
honey_format-0.15.0 lib/honey_format.rb
honey_format-0.14.0 lib/honey_format.rb
honey_format-0.13.0 lib/honey_format.rb