Sha256: 6cf0d36940227c32087f094ffe9f65050c2527415c18e8cb1965533a1f7538ab

Contents?: true

Size: 1.24 KB

Versions: 12

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

require 'honey_format/version'
require 'honey_format/configuration'
require 'honey_format/errors'
require 'honey_format/registry'
require 'honey_format/converters/converters'
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 converter registry
  # @return [Registry] the current converter registry
  def self.converter_registry
    config.converter_registry
  end

  # Returns the configured deduplicator registry
  # @return [Registry] the current deduplicator registry
  def self.header_deduplicator_registry
    config.header_deduplicator_registry
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
honey_format-0.27.0 lib/honey_format.rb
honey_format-0.26.0 lib/honey_format.rb
honey_format-0.25.0 lib/honey_format.rb
honey_format-0.24.0 lib/honey_format.rb
honey_format-0.23.0 lib/honey_format.rb
honey_format-0.22.0 lib/honey_format.rb
honey_format-0.21.1 lib/honey_format.rb
honey_format-0.21.0 lib/honey_format.rb
honey_format-0.20.0 lib/honey_format.rb
honey_format-0.19.0 lib/honey_format.rb
honey_format-0.18.0 lib/honey_format.rb
honey_format-0.17.0 lib/honey_format.rb