Class: Mail::DkimField

Inherits:
StructuredField
  • Object
show all
Defined in:
lib/mail/dkim_field.rb

Constant Summary collapse

FIELD_NAME =
'dkim-signature'
CAPITALIZED_FIELD =
'DKIM-Signature'

Instance Method Summary collapse

Constructor Details

#initialize(value = nil, charset = 'utf-8') ⇒ DkimField

Returns a new instance of DkimField.



10
11
12
13
14
15
# File 'lib/mail/dkim_field.rb', line 10

def initialize(value = nil, charset = 'utf-8')
  self.charset = charset
  value = strip_field(FIELD_NAME, value) if respond_to?(:strip_field)
  super(CAPITALIZED_FIELD, value, charset)
  self
end

Instance Method Details

#decodedObject



21
22
23
# File 'lib/mail/dkim_field.rb', line 21

def decoded
  "#{name}:#{value}\r\n"
end

#encodedObject



17
18
19
# File 'lib/mail/dkim_field.rb', line 17

def encoded
  "#{name}:#{value}\r\n"
end