Class: Mail::Jdec::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/mail/jdec/config.rb

Constant Summary collapse

NAMES =
[
  :enabled,
  :autodetect_confidence, :autodetect_skip_charsets, :mime_types_for_autodetect,
  :preferred_charsets, :keep_field_order
]

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Config

Returns a new instance of Config.



15
16
17
18
19
# File 'lib/mail/jdec/config.rb', line 15

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

Instance Method Details

#attributesObject



21
22
23
24
25
# File 'lib/mail/jdec/config.rb', line 21

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