Sha256: 8bd3d4e78a5d5c33650ef74b17e78d213f042af4dad00eb0451c66e3f98e2914

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true

module Mail
  module Jdec
    class Config
      NAMES = [
        :enabled,
        :autodetect_confidence, :autodetect_skip_charsets, :mime_types_for_autodetect,
        :preferred_charsets, :keep_field_order
      ]
      NAMES.each do |name|
        attr_accessor name
      end

      def initialize(attrs = {})
        attrs.each do |key, val|
          send("#{key}=", val)
        end
      end

      def attributes
        NAMES.each_with_object({}) do |name, hash|
          hash[name] = send(name)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mail-jdec-1.2.0 lib/mail/jdec/config.rb