Class: Mail::Jenc::Config

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

Constant Summary collapse

NAMES =
[:enabled, :rfc2231, :escape_sequence_charsets, :preferred_charsets]

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Config

Returns a new instance of Config.



11
12
13
14
15
# File 'lib/mail/jenc/config.rb', line 11

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

Instance Method Details

#attributesObject



17
18
19
20
21
# File 'lib/mail/jenc/config.rb', line 17

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