Class: Mail::ResentSenderField

Inherits:
StructuredField show all
Includes:
CommonAddress
Defined in:
lib/mail/fields/resent_sender_field.rb

Constant Summary collapse

FIELD_NAME =
'resent-sender'
CAPITALIZED_FIELD =
'Resent-Sender'

Instance Method Summary collapse

Methods included from CommonAddress

included

Methods inherited from StructuredField

#default

Methods included from Utilities

included

Methods included from CommonField

included

Constructor Details

#initialize(*args) ⇒ ResentSenderField

Returns a new instance of ResentSenderField.



36
37
38
39
40
41
# File 'lib/mail/fields/resent_sender_field.rb', line 36

def initialize(*args)
  super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, args.last))
  self.parse
  self

end

Instance Method Details

#addressObject



47
48
49
# File 'lib/mail/fields/resent_sender_field.rb', line 47

def address
  result = tree.addresses.first
end

#addressesObject



43
44
45
# File 'lib/mail/fields/resent_sender_field.rb', line 43

def addresses
  [address.address]
end

#decodedObject



55
56
57
# File 'lib/mail/fields/resent_sender_field.rb', line 55

def decoded
  do_decode
end

#encodedObject



51
52
53
# File 'lib/mail/fields/resent_sender_field.rb', line 51

def encoded
  do_encode(CAPITALIZED_FIELD)
end